Package net.minecraftforge.debug.block
Class FullPotsAccessorDemo.DioriteFlowerPotTileEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
-
- net.minecraft.tileentity.TileEntity
-
- net.minecraftforge.debug.block.FullPotsAccessorDemo.DioriteFlowerPotTileEntity
-
- All Implemented Interfaces:
ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
- Enclosing class:
- FullPotsAccessorDemo
private static class FullPotsAccessorDemo.DioriteFlowerPotTileEntity extends TileEntity
-
-
Field Summary
Fields Modifier and Type Field Description private IModelData
modelData
private Block
plant
static ModelProperty<Block>
PLANT_PROPERTY
-
Fields inherited from class net.minecraft.tileentity.TileEntity
level, remove, worldPosition
-
Fields inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
INFINITE_EXTENT_AABB
-
-
Constructor Summary
Constructors Constructor Description DioriteFlowerPotTileEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class net.minecraft.tileentity.TileEntity
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
deserializeNBT, deserializeNBT, getRenderBoundingBox, getTileEntity, onLoad, requestModelDataUpdate, serializeNBT
-
-
-
-
Field Detail
-
PLANT_PROPERTY
public static final ModelProperty<Block> PLANT_PROPERTY
-
modelData
private final IModelData modelData
-
plant
private Block plant
-
-
Method Detail
-
setPlant
public void setPlant(Block plant)
-
getPlant
public Block getPlant()
-
getModelData
public IModelData getModelData()
Description copied from interface:IForgeTileEntity
Allows you to return additional model data. This data can be used to provide additional functionality in yourIBakedModel
You need to schedule a refresh of you model data viaIForgeTileEntity.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- Returns:
- Your model data
-
getUpdateTag
public CompoundNBT getUpdateTag()
- Overrides:
getUpdateTag
in classTileEntity
-
handleUpdateTag
public void handleUpdateTag(BlockState state, CompoundNBT tag)
Description copied from interface:IForgeTileEntity
Called when the chunk's TE update tag, gotten from#getUpdateTag()
, is received on the client.Used to handle this tag in a special way. By default this simply calls
#readFromNBT(NBTTagCompound)
.tag
- TheNBTTagCompound
sent from#getUpdateTag()
-
getUpdatePacket
public SUpdateTileEntityPacket getUpdatePacket()
- Overrides:
getUpdatePacket
in classTileEntity
-
onDataPacket
public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt)
Description copied from interface:IForgeTileEntity
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.- Parameters:
net
- The NetworkManager the packet originated frompkt
- The data packet
-
load
public void load(BlockState state, CompoundNBT tag)
- Overrides:
load
in classTileEntity
-
save
public CompoundNBT save(CompoundNBT tag)
- Overrides:
save
in classTileEntity
-
-