public interface IForgeTileEntity extends ICapabilitySerializable<CompoundNBT>
Modifier and Type | Field and Description |
---|---|
static AxisAlignedBB |
INFINITE_EXTENT_AABB
Sometimes default render bounding box: infinite in scope.
|
Modifier and Type | Method and Description |
---|---|
default boolean |
canRenderBreaking()
Checks if this tile entity knows how to render its 'breaking' overlay effect.
|
default void |
deserializeNBT(CompoundNBT nbt) |
default IModelData |
getModelData()
Allows you to return additional model data.
|
default AxisAlignedBB |
getRenderBoundingBox()
Return an
AxisAlignedBB that controls the visible scope of a TileEntitySpecialRenderer associated with this TileEntity
Defaults to the collision bounding box Block#getCollisionBoundingBoxFromPool(World, int, int, int) associated with the block
at this location. |
CompoundNBT |
getTileData()
Gets a
NBTTagCompound that can be used to store custom data for this tile entity. |
default TileEntity |
getTileEntity() |
default void |
handleUpdateTag(CompoundNBT tag)
Called when the chunk's TE update tag, gotten from
#getUpdateTag() , is received on the client. |
default boolean |
hasFastRenderer()
If the TileEntitySpecialRenderer associated with this TileEntity can be batched in with another renderers, and won't access the GL state.
|
default void |
onChunkUnloaded() |
default void |
onDataPacket(NetworkManager net,
SUpdateTileEntityPacket pkt)
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 (by
World.addTileEntity(TileEntity) ). |
default void |
requestModelDataUpdate()
Requests a refresh for the model data of your TE
Call this every time your
getModelData() changes |
default CompoundNBT |
serializeNBT() |
getCapability, getCapability
static final AxisAlignedBB INFINITE_EXTENT_AABB
TileEntitySpecialRenderer
.default TileEntity getTileEntity()
default void deserializeNBT(CompoundNBT nbt)
deserializeNBT
in interface INBTSerializable<CompoundNBT>
default CompoundNBT serializeNBT()
serializeNBT
in interface INBTSerializable<CompoundNBT>
default void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt)
net
- The NetworkManager the packet originated frompkt
- The data packetdefault void handleUpdateTag(CompoundNBT tag)
#getUpdateTag()
, is received on the client.
Used to handle this tag in a special way. By default this simply calls #readFromNBT(NBTTagCompound)
.
tag
- The NBTTagCompound
sent from #getUpdateTag()
CompoundNBT getTileData()
NBTTagCompound
that can be used to store custom data for this tile entity.
It will be written, and read from disc, so it persists over world saves.default void onChunkUnloaded()
default void onLoad()
World.addTileEntity(TileEntity)
).
Override instead of adding if (firstTick)
stuff in update.default AxisAlignedBB getRenderBoundingBox()
AxisAlignedBB
that controls the visible scope of a TileEntitySpecialRenderer
associated with this TileEntity
Defaults to the collision bounding box Block#getCollisionBoundingBoxFromPool(World, int, int, int)
associated with the block
at this location.AxisAlignedBB
for the TileEntity
default boolean canRenderBreaking()
default boolean hasFastRenderer()
default void requestModelDataUpdate()
getModelData()
changes@Nonnull default IModelData getModelData()
IBakedModel
You need to schedule a refresh of you model data via requestModelDataUpdate()
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