public abstract class TileEntity extends CapabilityProvider<TileEntity> implements IForgeTileEntity
Modifier and Type | Field and Description |
---|---|
private BlockState |
blockState |
private CompoundNBT |
customTileData |
private boolean |
hasLoggedInvalidStateBefore |
protected World |
level |
private static org.apache.logging.log4j.Logger |
LOGGER |
protected boolean |
remove |
private TileEntityType<?> |
type |
protected BlockPos |
worldPosition |
INFINITE_EXTENT_AABB
Constructor and Description |
---|
TileEntity(TileEntityType<?> p_i48289_1_) |
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
getCapability, getCapability
private static final org.apache.logging.log4j.Logger LOGGER
private final TileEntityType<?> type
@Nullable protected World level
protected BlockPos worldPosition
protected boolean remove
@Nullable private BlockState blockState
private boolean hasLoggedInvalidStateBefore
private CompoundNBT customTileData
public TileEntity(TileEntityType<?> p_i48289_1_)
@Nullable public World getLevel()
public boolean hasLevel()
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
public CompoundNBT save(CompoundNBT p_189515_1_)
private CompoundNBT saveMetadata(CompoundNBT p_189516_1_)
@Nullable public static TileEntity loadStatic(BlockState p_235657_0_, CompoundNBT p_235657_1_)
public void setChanged()
public double getViewDistance()
public BlockPos getBlockPos()
public BlockState getBlockState()
@Nullable public SUpdateTileEntityPacket getUpdatePacket()
public CompoundNBT getUpdateTag()
public boolean isRemoved()
public void setRemoved()
public void onChunkUnloaded()
onChunkUnloaded
in interface IForgeTileEntity
public void clearRemoved()
public boolean triggerEvent(int p_145842_1_, int p_145842_2_)
public void clearCache()
public void fillCrashReportCategory(CrashReportCategory p_145828_1_)
public void setPosition(BlockPos p_174878_1_)
public boolean onlyOpCanSetNbt()
public void rotate(Rotation p_189667_1_)
public void mirror(Mirror p_189668_1_)
public TileEntityType<?> getType()
public CompoundNBT getTileData()
IForgeTileEntity
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.getTileData
in interface IForgeTileEntity
public void logInvalidState()