接口 IForgeBlockEntity
- 所有超级接口:
ICapabilityProvider
- 所有已知实现类:
AbstractFurnaceBlockEntity
,BannerBlockEntity
,BarrelBlockEntity
,BaseContainerBlockEntity
,BeaconBlockEntity
,BedBlockEntity
,BeehiveBlockEntity
,BellBlockEntity
,BlastFurnaceBlockEntity
,BlockEntity
,BrewingStandBlockEntity
,BrushableBlockEntity
,CalibratedSculkSensorBlockEntity
,CampfireBlockEntity
,ChestBlockEntity
,ChiseledBookShelfBlockEntity
,CommandBlockEntity
,ComparatorBlockEntity
,ConduitBlockEntity
,CrafterBlockEntity
,CreakingHeartBlockEntity
,DaylightDetectorBlockEntity
,DecoratedPotBlockEntity
,DispenserBlockEntity
,DropperBlockEntity
,EnchantingTableBlockEntity
,EnderChestBlockEntity
,FluidHandlerBlockEntity
,FurnaceBlockEntity
,HangingSignBlockEntity
,HopperBlockEntity
,JigsawBlockEntity
,JukeboxBlockEntity
,LecternBlockEntity
,PistonMovingBlockEntity
,RandomizableContainerBlockEntity
,SculkCatalystBlockEntity
,SculkSensorBlockEntity
,SculkShriekerBlockEntity
,ShulkerBoxBlockEntity
,SignBlockEntity
,SkullBlockEntity
,SmokerBlockEntity
,SpawnerBlockEntity
,StructureBlockEntity
,TheEndGatewayBlockEntity
,TheEndPortalBlockEntity
,TrappedChestBlockEntity
,TrialSpawnerBlockEntity
,VaultBlockEntity
-
字段概要
字段 -
方法概要
修饰符和类型方法说明default @NotNull ModelData
Allows you to return additional model data.default AABB
Return anAABB
that controls the visible scope of a引用无效
BlockEntityWithoutLevelRenderer
BlockEntity
Defaults to the collision bounding boxBlockBehaviour.BlockStateBase.getCollisionShape(BlockGetter, BlockPos)
associated with the block at this location.default void
handleUpdateTag
(CompoundTag tag, HolderLookup.Provider holders) Called when the chunk's TE update tag, gotten from引用无效
BlockEntity#getUpdateTag()
default boolean
hasCustomOutlineRendering
(Player player) Returns whether thisBlockEntity
has custom outline rendering behavior.default void
default void
onDataPacket
(Connection connection, ClientboundBlockEntityDataPacket pkt, HolderLookup.Provider lookup) Called when you receive a TileEntityData packet for the location this TileEntity is currently in.default void
onLoad()
Called when this is first added to the world (byLevelChunk.addAndRegisterBlockEntity(BlockEntity)
) or right before the first tick when the chunk is generated or loaded from disk.default void
Requests a refresh for the model data of your TE Call this every time yourgetModelData()
changesprivate BlockEntity
self()
从接口继承的方法 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
-
字段详细资料
-
INFINITE_EXTENT_AABB
Sometimes default render bounding box: infinite in scope. Used to control rendering on引用无效
BlockEntityWithoutLevelRenderer
-
-
方法详细资料
-
self
-
onDataPacket
default void onDataPacket(Connection connection, ClientboundBlockEntityDataPacket pkt, HolderLookup.Provider lookup) Called when you receive a TileEntityData packet for the location this TileEntity is currently in. On the client, the NetworkManager will always be the remote server. On the server, it will be whomever is responsible for sending the packet.- 参数:
pkt
- The data packetnet
- The NetworkManager the packet originated from
-
handleUpdateTag
Called when the chunk's TE update tag, gotten from引用无效
BlockEntity#getUpdateTag()
Used to handle this tag in a special way. By default this simply calls
BlockEntity.loadWithComponents(CompoundTag, HolderLookup.Provider)
.- 参数:
tag
- TheCompoundTag
sent from引用无效
BlockEntity#getUpdateTag()
-
onChunkUnloaded
default void onChunkUnloaded() -
onLoad
default void onLoad()Called when this is first added to the world (byLevelChunk.addAndRegisterBlockEntity(BlockEntity)
) or right before the first tick when the chunk is generated or loaded from disk. Override instead of addingif (firstTick)
stuff in update. -
getRenderBoundingBox
Return anAABB
that controls the visible scope of a引用无效
BlockEntityWithoutLevelRenderer
BlockEntity
Defaults to the collision bounding boxBlockBehaviour.BlockStateBase.getCollisionShape(BlockGetter, BlockPos)
associated with the block at this location.- 返回:
- an appropriately size
AABB
for theBlockEntity
-
requestModelDataUpdate
default void requestModelDataUpdate()Requests a refresh for the model data of your TE Call this every time yourgetModelData()
changes -
getModelData
Allows you to return additional model data. This data can be used to provide additional functionality in yourBakedModel
You need to schedule a refresh of you model data viarequestModelDataUpdate()
if the result of this function changes. Note that this method may be called on a chunk render thread instead of the main client thread- 返回:
- Your model data
-
hasCustomOutlineRendering
Returns whether thisBlockEntity
has custom outline rendering behavior.- 参数:
player
- the local player currently viewing thisBlockEntity
- 返回:
true
to enable outline processing
-