public class EvilCraftTileEntity
extends net.minecraft.tileentity.TileEntity
sendUpdate().
Every instance has a continuously looping counter that counts from getUpdateBackoffTicks() to zero.
and every time the counter reaches zero, the backoff will be reset and an update packet will be sent
if one has been queued.| Constructor and Description |
|---|
EvilCraftTileEntity()
Make a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterSendUpdate()
Called when after update is sent.
|
protected void |
beforeSendUpdate()
Called when before update is sent.
|
boolean |
canInteractWith(net.minecraft.entity.player.EntityPlayer entityPlayer)
If this entity is interactable with a player.
|
void |
destroy()
Called when the block of this tile entity is destroyed.
|
ConfigurableBlockContainer |
getBlock()
Get the block type this tile entity is defined for.
|
net.minecraft.network.Packet |
getDescriptionPacket() |
net.minecraft.nbt.NBTTagCompound |
getNBTTagCompound()
Get the NBT tag for this tile entity.
|
net.minecraftforge.common.util.ForgeDirection |
getRotation()
Get the current rotation of this tile entity.
|
protected int |
getUpdateBackoffTicks() |
boolean |
isRotatable()
If the block this tile entity has can be rotated.
|
protected boolean |
isTileValid() |
void |
onDataPacket(net.minecraft.network.NetworkManager net,
net.minecraft.network.play.server.S35PacketUpdateTileEntity packet) |
void |
onLoad()
When the tile is loaded or created.
|
protected void |
onSendUpdate()
Called when an update will is sent.
|
void |
onUpdateReceived()
This method is called when the tile entity receives
an update (ie a data packet) from the server.
|
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound NBTTagCompound) |
void |
sendImmediateUpdate()
Send an immediate world update for the coordinates of this tile entity.
|
void |
sendUpdate()
Send a world update for the coordinates of this tile entity.
|
void |
setRotatable(boolean rotatable)
Set whether or not the block that has this tile entity can be rotated.
|
void |
setRotation(net.minecraftforge.common.util.ForgeDirection rotation)
Set the rotation of this tile entity.
|
void |
updateEntity()
Do not override this method (you won't even be able to do so).
|
protected void |
updateTileEntity()
Override this method instead of
updateEntity(). |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound NBTTagCompound) |
addMapping, canUpdate, createAndLoadEntity, func_145828_a, getBlockMetadata, getBlockType, getDistanceFrom, getMaxRenderDistanceSquared, getRenderBoundingBox, getWorldObj, hasWorldObj, invalidate, isInvalid, markDirty, onChunkUnload, receiveClientEvent, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validatepublic void destroy()
public boolean canInteractWith(net.minecraft.entity.player.EntityPlayer entityPlayer)
entityPlayer - The player that is checked.public final void sendUpdate()
public final void sendImmediateUpdate()
sendUpdate() but will
ignore the update backoff.public final void updateEntity()
updateEntity in class net.minecraft.tileentity.TileEntityprotected void updateTileEntity()
updateEntity().
This method is called each tick.protected boolean isTileValid()
protected void onSendUpdate()
protected void beforeSendUpdate()
protected void afterSendUpdate()
public net.minecraft.network.Packet getDescriptionPacket()
getDescriptionPacket in class net.minecraft.tileentity.TileEntitypublic void onDataPacket(net.minecraft.network.NetworkManager net,
net.minecraft.network.play.server.S35PacketUpdateTileEntity packet)
onDataPacket in class net.minecraft.tileentity.TileEntitypublic void writeToNBT(net.minecraft.nbt.NBTTagCompound NBTTagCompound)
writeToNBT in class net.minecraft.tileentity.TileEntitypublic void readFromNBT(net.minecraft.nbt.NBTTagCompound NBTTagCompound)
readFromNBT in class net.minecraft.tileentity.TileEntitypublic void onLoad()
public net.minecraft.nbt.NBTTagCompound getNBTTagCompound()
writeToNBT(NBTTagCompound) method.public boolean isRotatable()
public void setRotatable(boolean rotatable)
rotatable - If it can be rotated.public net.minecraftforge.common.util.ForgeDirection getRotation()
ForgeDirection.NORTH.public void setRotation(net.minecraftforge.common.util.ForgeDirection rotation)
ForgeDirection.NORTH.rotation - The new rotation.public ConfigurableBlockContainer getBlock()
public void onUpdateReceived()
protected int getUpdateBackoffTicks()