T - The subclass of TankInventoryTileEntity, will be in
most cases just the extension class.public abstract class TickingTankInventoryTileEntity<T extends TankInventoryTileEntity> extends TankInventoryTileEntity
TickComponent that are able to tick.
And these components will contain a collection of ITickAction
that can perform specific actions depending on the condition of the TickComponent.TickComponentsendUpdateOnTankChanged, tankSizeinventory, sendUpdateOnInventoryChanged, slotSides, slotSidesSize| Constructor and Description |
|---|
TickingTankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName,
net.minecraftforge.fluids.Fluid acceptedFluid)
Make a new TickingTankInventoryTileEntity.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
addTicker(TickComponent<T,ITickAction<T>> ticker)
Add a new ticker.
|
boolean |
canUpdate() |
int |
getCurrentState()
Get the current (numerical) state.
|
abstract int |
getNewState()
Get the new (numerical) state for this tile entity.
|
java.util.LinkedList<TickComponent<T,ITickAction<T>>> |
getTickers()
Get the tickers this TileEntity has.
|
abstract void |
onStateChanged()
What needs to happen when the (numerical) state is changed.
|
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound data) |
void |
updateTileEntity()
Override this method instead of
EvilCraftTileEntity.updateEntity(). |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound data) |
canDrain, canFill, drain, drain, drain, drain, fill, fill, getTank, getTankInfo, isSendUpdateOnTankChanged, newTank, onSendUpdate, setSendUpdateOnTankChangedaddSlotsToSide, canExtractItem, canInsertItem, closeInventory, decrStackSize, getAccessibleSlotsFromSide, getInventory, getInventoryName, getInventoryStackLimit, getSizeInventory, getStackInSlot, getStackInSlotOnClosing, hasCustomInventoryName, isSendUpdateOnInventoryChanged, isUseableByPlayer, onInventoryChanged, openInventory, setInventorySlotContents, setSendUpdateOnInventoryChangedafterSendUpdate, beforeSendUpdate, canInteractWith, destroy, getBlock, getDescriptionPacket, getNBTTagCompound, getRotation, getUpdateBackoffTicks, isRotatable, isTileValid, onDataPacket, onLoad, onUpdateReceived, sendImmediateUpdate, sendUpdate, setRotatable, setRotation, updateEntityaddMapping, createAndLoadEntity, func_145828_a, getBlockMetadata, getBlockType, getDistanceFrom, getMaxRenderDistanceSquared, getRenderBoundingBox, getWorldObj, hasWorldObj, invalidate, isInvalid, markDirty, onChunkUnload, receiveClientEvent, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validatepublic TickingTankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName,
net.minecraftforge.fluids.Fluid acceptedFluid)
inventorySize - Amount of slots in the inventory.inventoryName - Internal name of the inventory.tankSize - Size (mB) of the tank.tankName - Internal name of the tank.acceptedFluid - Type of Fluid to accept.protected int addTicker(TickComponent<T,ITickAction<T>> ticker)
ticker - The ticker to (try) run every tick.public java.util.LinkedList<TickComponent<T,ITickAction<T>>> getTickers()
public boolean canUpdate()
canUpdate in class net.minecraft.tileentity.TileEntitypublic void readFromNBT(net.minecraft.nbt.NBTTagCompound data)
readFromNBT in class TankInventoryTileEntitypublic void writeToNBT(net.minecraft.nbt.NBTTagCompound data)
writeToNBT in class TankInventoryTileEntitypublic void updateTileEntity()
EvilCraftTileEntityEvilCraftTileEntity.updateEntity().
This method is called each tick.updateTileEntity in class EvilCraftTileEntitypublic abstract int getNewState()
public abstract void onStateChanged()
public int getCurrentState()