Class TrackBlockEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.simibubi.create.foundation.blockEntity.SyncedBlockEntity
com.simibubi.create.foundation.blockEntity.CachedRenderBBBlockEntity
com.simibubi.create.foundation.blockEntity.SmartBlockEntity
com.simibubi.create.content.trains.track.TrackBlockEntity
- All Implemented Interfaces:
TransformableBlockEntity,PartialSafeNBT,SpecialBlockEntityItemRequirement,IMergeableBE,IInteractionChecker,net.createmod.ponder.api.VirtualBlockEntity,net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
public class TrackBlockEntity
extends SmartBlockEntity
implements TransformableBlockEntity, IMergeableBE
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionnet.createmod.catnip.data.Pair<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>, net.minecraft.core.BlockPos> Fields inherited from class com.simibubi.create.foundation.blockEntity.SmartBlockEntity
lazyTickCounter, lazyTickRateFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionTrackBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(net.minecraft.world.level.block.entity.BlockEntity other) voidaddBehaviours(List<BlockEntityBehaviour> behaviours) voidaddConnection(BezierConnection connection) voidbind(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> boundDimension, net.minecraft.core.BlockPos boundLocation) Map<net.minecraft.core.BlockPos, BezierConnection> net.neoforged.neoforge.client.model.data.ModelDatanet.minecraft.world.phys.AABBbooleanvoidvoidBlock destroyed or Chunk unloaded.booleanisTilted()voidlazyTick()voidmanageFakeTracksAlong(BezierConnection bc, boolean remove) protected voidread(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Hook only these in future subclasses of STEvoidremove()Block destroyed or picked up by a contraption.voidremoveConnection(net.minecraft.core.BlockPos target) voidremoveInboundConnections(boolean dropAndDiscard) voidtick()voidtransform(net.minecraft.world.level.block.entity.BlockEntity be, StructureTransform transform) voidprotected voidwrite(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Hook only these in future subclasses of STEvoidwriteSafe(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) This will always be called from the logical serverMethods inherited from class com.simibubi.create.foundation.blockEntity.SmartBlockEntity
addBehavioursDeferred, attachBehaviourLate, award, awardIfNear, canPlayerUse, destroy, forEachBehaviour, getAllBehaviours, getBehaviour, getRequiredItems, isChunkUnloaded, isVirtual, loadAdditional, markVirtual, onChunkUnloaded, readClient, refreshBlockState, registerAwardables, removeBehaviour, saveAdditional, sendToMenu, setLazyTickRate, setRemoved, writeClientMethods inherited from class com.simibubi.create.foundation.blockEntity.CachedRenderBBBlockEntity
createRenderBoundingBox, invalidateRenderBoundingBoxMethods inherited from class com.simibubi.create.foundation.blockEntity.SyncedBlockEntity
blockHolderGetter, getUpdatePacket, getUpdateTag, handleUpdateTag, notifyUpdate, onDataPacket, sendDataMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, syncData, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
hasCustomOutlineRendering, invalidateCapabilities, onLoad, requestModelDataUpdate
-
Field Details
-
boundLocation
public net.createmod.catnip.data.Pair<net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>,net.minecraft.core.BlockPos> boundLocation -
tilt
-
-
Constructor Details
-
TrackBlockEntity
public TrackBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getConnections
-
initialize
public void initialize()- Overrides:
initializein classSmartBlockEntity
-
tick
public void tick()- Overrides:
tickin classSmartBlockEntity
-
lazyTick
public void lazyTick()- Overrides:
lazyTickin classSmartBlockEntity
-
validateConnections
public void validateConnections() -
addConnection
-
removeConnection
public void removeConnection(net.minecraft.core.BlockPos target) -
removeInboundConnections
public void removeInboundConnections(boolean dropAndDiscard) -
bind
public void bind(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> boundDimension, net.minecraft.core.BlockPos boundLocation) -
isTilted
public boolean isTilted() -
writeSafe
public void writeSafe(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) Description copied from interface:PartialSafeNBTThis will always be called from the logical server- Specified by:
writeSafein interfacePartialSafeNBT- Overrides:
writeSafein classSmartBlockEntity
-
write
protected void write(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Description copied from class:SmartBlockEntityHook only these in future subclasses of STE- Overrides:
writein classSmartBlockEntity
-
read
protected void read(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) Description copied from class:SmartBlockEntityHook only these in future subclasses of STE- Overrides:
readin classSmartBlockEntity
-
getRenderBoundingBox
public net.minecraft.world.phys.AABB getRenderBoundingBox()- Overrides:
getRenderBoundingBoxin classCachedRenderBBBlockEntity
-
addBehaviours
- Specified by:
addBehavioursin classSmartBlockEntity
-
accept
public void accept(net.minecraft.world.level.block.entity.BlockEntity other) - Specified by:
acceptin interfaceIMergeableBE
-
hasInteractableConnections
public boolean hasInteractableConnections() -
transform
public void transform(net.minecraft.world.level.block.entity.BlockEntity be, StructureTransform transform) - Specified by:
transformin interfaceTransformableBlockEntity
-
invalidate
public void invalidate()Description copied from class:SmartBlockEntityBlock destroyed or Chunk unloaded. Usually invalidates capabilities- Overrides:
invalidatein classSmartBlockEntity
-
remove
public void remove()Description copied from class:SmartBlockEntityBlock destroyed or picked up by a contraption. Usually detaches kinetics- Overrides:
removein classSmartBlockEntity
-
getModelData
public net.neoforged.neoforge.client.model.data.ModelData getModelData()- Specified by:
getModelDatain interfacenet.neoforged.neoforge.common.extensions.IBlockEntityExtension
-
manageFakeTracksAlong
-