T - The subclass of TankInventoryTileEntity, will be in
most cases just the extension class.public abstract class TickingTankInventoryTileEntity<T extends org.cyclops.cyclopscore.tileentity.TankInventoryTileEntity>
extends org.cyclops.cyclopscore.tileentity.TankInventoryTileEntity
implements org.cyclops.cyclopscore.tileentity.CyclopsTileEntity.ITickingTile
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.TickComponent| Modifier and Type | Field and Description |
|---|---|
protected org.cyclops.cyclopscore.tileentity.CyclopsTileEntity.ITickingTile |
tickingTileComponent |
sendUpdateOnTankChanged, tankSizeinventory, slotSides| 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.
|
TickingTankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName,
net.minecraftforge.fluids.Fluid acceptedFluid,
int StackSize)
Make a new TickingTankInventoryTileEntity.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
addTicker(TickComponent<T,ITickAction<T>> ticker)
Add a new ticker.
|
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() |
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound data) |
drain, drain, fill, getTank, isSendUpdateOnTankChanged, isUpdateInventoryHashOnTankContentsChanged, newTank, onSendUpdate, onTankChanged, setSendUpdateOnTankChangedaddSlotsToSide, getInventory, getSlotsForFaceaddInventoryStateCapability, canAccess, canExtractItem, canInsertItem, canInteractWith, clear, closeInventory, decrStackSize, getDisplayName, getField, getFieldCount, getInventoryHash, getInventoryStackLimit, getName, getSizeInventory, getStackInSlot, hasCustomName, isEmpty, isItemValidForSlot, isSendUpdateOnInventoryChanged, isUsableByPlayer, markDirty, onInventoryChanged, openInventory, removeStackFromSlot, setField, setInventorySlotContents, setSendUpdateOnInventoryChanged, updateInventoryHashaddCapabilityInternal, addCapabilitySided, afterSendUpdate, beforeSendUpdate, destroy, getBlock, getCapabilities, getCapability, getNBTTagCompound, getRotation, getUpdateBackoffTicks, getUpdatePacket, getUpdateTag, hasCapability, isRotatable, isTicking, onDataPacket, onLoad, onUpdateReceived, readGeneratedFieldsFromNBT, sendImmediateUpdate, sendUpdate, setRotatable, setRotation, shouldRefresh, writeGeneratedFieldsToNBTaddInfoToCrashReport, canRenderBreaking, create, deserializeNBT, getBlockMetadata, getBlockType, getDistanceSq, getKey, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getWorld, handleUpdateTag, hasFastRenderer, hasWorld, invalidate, isInvalid, mirror, onChunkUnload, onlyOpsCanSetNbt, receiveClientEvent, register, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, setWorldCreate, shouldRenderInPass, updateContainingBlockInfo, validateprotected final org.cyclops.cyclopscore.tileentity.CyclopsTileEntity.ITickingTile tickingTileComponent
public TickingTankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName,
net.minecraftforge.fluids.Fluid acceptedFluid,
int StackSize)
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.StackSize - The maximum StackSize each slot can have.public 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 void readFromNBT(net.minecraft.nbt.NBTTagCompound data)
readFromNBT in class org.cyclops.cyclopscore.tileentity.TankInventoryTileEntitypublic net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound data)
writeToNBT in class org.cyclops.cyclopscore.tileentity.TankInventoryTileEntitypublic void updateTileEntity()
updateTileEntity in class org.cyclops.cyclopscore.tileentity.CyclopsTileEntitypublic abstract int getNewState()
public abstract void onStateChanged()
public int getCurrentState()