private static class FullPotsAccessorDemo.DioriteFlowerPotTileEntity extends TileEntity
Modifier and Type | Field and Description |
---|---|
private IModelData |
modelData |
private Block |
plant |
static ModelProperty<Block> |
PLANT_PROPERTY |
level, remove, worldPosition
INFINITE_EXTENT_AABB
Constructor and Description |
---|
DioriteFlowerPotTileEntity() |
Modifier and Type | Method and Description |
---|---|
IModelData |
getModelData()
Allows you to return additional model data.
|
Block |
getPlant() |
SUpdateTileEntityPacket |
getUpdatePacket() |
CompoundNBT |
getUpdateTag() |
void |
handleUpdateTag(BlockState state,
CompoundNBT tag)
Called when the chunk's TE update tag, gotten from
#getUpdateTag() , is received on the client. |
void |
load(BlockState state,
CompoundNBT tag) |
void |
onDataPacket(NetworkManager net,
SUpdateTileEntityPacket pkt)
Called when you receive a TileEntityData packet for the location this
TileEntity is currently in.
|
CompoundNBT |
save(CompoundNBT tag) |
void |
setPlant(Block plant) |
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserializeNBT, deserializeNBT, getRenderBoundingBox, getTileEntity, onLoad, requestModelDataUpdate, serializeNBT
getCapability, getCapability
public static final ModelProperty<Block> PLANT_PROPERTY
private final IModelData modelData
private Block plant
public void setPlant(Block plant)
public Block getPlant()
public IModelData getModelData()
IForgeTileEntity
IBakedModel
You need to schedule a refresh of you model data via IForgeTileEntity.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 threadpublic CompoundNBT getUpdateTag()
getUpdateTag
in class TileEntity
public void handleUpdateTag(BlockState state, CompoundNBT tag)
IForgeTileEntity
#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()
public SUpdateTileEntityPacket getUpdatePacket()
getUpdatePacket
in class TileEntity
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt)
IForgeTileEntity
net
- The NetworkManager the packet originated frompkt
- The data packetpublic void load(BlockState state, CompoundNBT tag)
load
in class TileEntity
public CompoundNBT save(CompoundNBT tag)
save
in class TileEntity