public abstract class TileEntity extends CapabilityProvider<TileEntity> implements IForgeTileEntity
| Modifier and Type | Field and Description |
|---|---|
private BlockState |
cachedBlockState |
private CompoundNBT |
customTileData |
private static org.apache.logging.log4j.Logger |
LOGGER |
protected BlockPos |
pos |
protected boolean |
removed |
private TileEntityType<?> |
type |
private boolean |
warnedInvalidBlock |
protected World |
world |
INFINITE_EXTENT_AABB| Constructor and Description |
|---|
TileEntity(TileEntityType<?> tileEntityTypeIn) |
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanRenderBreaking, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, hasFastRenderer, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBTgetCapability, getCapabilityprivate static final org.apache.logging.log4j.Logger LOGGER
private final TileEntityType<?> type
@Nullable protected World world
protected BlockPos pos
protected boolean removed
@Nullable private BlockState cachedBlockState
private boolean warnedInvalidBlock
private CompoundNBT customTileData
public TileEntity(TileEntityType<?> tileEntityTypeIn)
@Nullable public World getWorld()
public boolean hasWorld()
public void read(CompoundNBT compound)
public CompoundNBT write(CompoundNBT compound)
private CompoundNBT writeInternal(CompoundNBT compound)
@Nullable public static TileEntity create(CompoundNBT tag)
public void markDirty()
public double getDistanceSq(double x,
double y,
double z)
public double getMaxRenderDistanceSquared()
public BlockPos getPos()
public BlockState getBlockState()
@Nullable public SUpdateTileEntityPacket getUpdatePacket()
public CompoundNBT getUpdateTag()
public boolean isRemoved()
public void remove()
public void validate()
public boolean receiveClientEvent(int id,
int type)
public void updateContainingBlockInfo()
public void addInfoToCrashReport(CrashReportCategory reportCategory)
public void setPos(BlockPos posIn)
public boolean onlyOpsCanSetNbt()
public void rotate(Rotation rotationIn)
public void mirror(Mirror mirrorIn)
public TileEntityType<?> getType()
public CompoundNBT getTileData()
IForgeTileEntityNBTTagCompound 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.getTileData in interface IForgeTileEntitypublic void warnInvalidBlock()