public abstract class TileEntity extends CapabilityProvider<TileEntity> implements IForgeTileEntity
修飾子とタイプ | フィールドと説明 |
---|---|
protected BlockPos |
pos |
protected boolean |
removed |
protected World |
world
the instance of the world the tile entity is in.
|
INFINITE_EXTENT_AABB
コンストラクタと説明 |
---|
TileEntity(TileEntityType<?> tileEntityTypeIn) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addInfoToCrashReport(CrashReportCategory reportCategory) |
static TileEntity |
create(CompoundNBT tag) |
BlockState |
getBlockState() |
double |
getDistanceSq(double x,
double y,
double z)
Returns the square of the distance between this entity and the passed in coordinates.
|
double |
getMaxRenderDistanceSquared() |
BlockPos |
getPos() |
CompoundNBT |
getTileData()
Gets a
NBTTagCompound that can be used to store custom data for this tile entity. |
TileEntityType<?> |
getType() |
SUpdateTileEntityPacket |
getUpdatePacket()
Retrieves packet to send to the client whenever this Tile Entity is resynced via World.notifyBlockUpdate.
|
CompoundNBT |
getUpdateTag()
Get an NBT compound to sync to the client with SPacketChunkData, used for initial loading of the chunk or when
many blocks change at once.
|
World |
getWorld()
Returns the worldObj for this tileEntity.
|
boolean |
hasWorld()
Returns true if the worldObj isn't null.
|
boolean |
isRemoved() |
void |
markDirty()
For tile entities, ensures the chunk containing the tile entity is saved to disk later - the game won't think it
hasn't changed and skip it.
|
void |
mirror(Mirror mirrorIn) |
boolean |
onlyOpsCanSetNbt()
Checks if players can use this tile entity to access operator (permission level 2) commands either directly or
indirectly, such as give or setblock.
|
void |
read(CompoundNBT compound) |
boolean |
receiveClientEvent(int id,
int type)
See
Block#eventReceived for more information. |
void |
remove()
invalidates a tile entity
|
void |
rotate(Rotation rotationIn) |
void |
setPos(BlockPos posIn) |
void |
setWorldAndPos(World p_226984_1_,
BlockPos p_226984_2_) |
void |
updateContainingBlockInfo() |
void |
validate()
validates a tile entity
|
void |
warnInvalidBlock() |
CompoundNBT |
write(CompoundNBT compound) |
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canRenderBreaking, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, hasFastRenderer, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
getCapability, getCapability
@Nullable protected World world
protected BlockPos pos
protected boolean removed
public TileEntity(TileEntityType<?> tileEntityTypeIn)
@Nullable public World getWorld()
public boolean hasWorld()
public void read(CompoundNBT compound)
public CompoundNBT write(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()
IForgeTileEntity.onDataPacket(net.minecraft.network.NetworkManager, net.minecraft.network.play.server.SUpdateTileEntityPacket)
public CompoundNBT getUpdateTag()
handleUpdateTag
public boolean isRemoved()
public void remove()
public void validate()
public boolean receiveClientEvent(int id, int type)
Block#eventReceived
for more information. This must return true serverside before it is called
clientside.public void updateContainingBlockInfo()
public void addInfoToCrashReport(CrashReportCategory reportCategory)
public void setPos(BlockPos posIn)
public boolean onlyOpsCanSetNbt()
Entity.ignoreItemEntityData()
.For example, signs
(player right-clicking) and command blocks
are considered
accessible.
public void rotate(Rotation rotationIn)
public void mirror(Mirror mirrorIn)
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
インタフェース内 IForgeTileEntity
public void warnInvalidBlock()