public abstract class TankInventoryTileEntity extends InventoryTileEntity implements net.minecraftforge.fluids.IFluidHandler
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
sendUpdateOnTankChanged |
protected int |
tankSize |
inventory, sendUpdateOnInventoryChanged, slotSides, slotSidesSize| Constructor and Description |
|---|
TankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int stackSize,
int tankSize,
java.lang.String tankName)
Make new tile with a tank that can accept anything and an inventory.
|
TankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int stackSize,
int tankSize,
java.lang.String tankName,
net.minecraftforge.fluids.Fluid acceptedFluid)
Make new tile with a tank that can accept only one fluid and an inventory.
|
TankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName)
Make new tile with a tank that can accept anything and an inventory.
|
TankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName,
net.minecraftforge.fluids.Fluid acceptedFluid)
Make new tile with a tank that can accept only one fluid and an inventory.
|
TankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName,
int stackSize)
Make new tile with a tank that can accept anything and an inventory.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDrain(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.Fluid fluid) |
boolean |
canFill(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.Fluid fluid) |
net.minecraftforge.fluids.FluidStack |
drain(net.minecraftforge.fluids.FluidStack resource,
boolean doDrain)
Drains fluid out of internal tanks.
|
net.minecraftforge.fluids.FluidStack |
drain(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.FluidStack resource,
boolean doDrain) |
net.minecraftforge.fluids.FluidStack |
drain(net.minecraftforge.common.util.ForgeDirection from,
int maxDrain,
boolean doDrain) |
net.minecraftforge.fluids.FluidStack |
drain(int maxDrain,
boolean doDrain)
Drains fluid out of internal tanks.
|
int |
fill(net.minecraftforge.fluids.FluidStack resource,
boolean doFill)
Fills fluid into internal tanks.
|
int |
fill(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.FluidStack resource,
boolean doFill) |
SingleUseTank |
getTank()
Get the internal tank
|
net.minecraftforge.fluids.FluidTankInfo[] |
getTankInfo(net.minecraftforge.common.util.ForgeDirection from) |
boolean |
isSendUpdateOnTankChanged()
If this tile should send block updates when the tank has changed.
|
protected SingleUseTank |
newTank(java.lang.String tankName,
int tankSize) |
protected void |
onSendUpdate()
Called when an update will is sent.
|
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound data) |
void |
setSendUpdateOnTankChanged(boolean sendUpdateOnTankChanged)
If this tile should send block updates when the tank has changed.
|
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound data) |
addSlotsToSide, 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, updateEntity, updateTileEntityaddMapping, canUpdate, createAndLoadEntity, func_145828_a, getBlockMetadata, getBlockType, getDistanceFrom, getMaxRenderDistanceSquared, getRenderBoundingBox, getWorldObj, hasWorldObj, invalidate, isInvalid, markDirty, onChunkUnload, receiveClientEvent, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validateprotected int tankSize
protected boolean sendUpdateOnTankChanged
public TankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName,
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.stackSize - The maximum stacksize each slot can have.public TankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int tankSize,
java.lang.String tankName)
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.public TankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int stackSize,
int tankSize,
java.lang.String tankName)
inventorySize - Amount of slots in the inventory.inventoryName - Internal name of the inventory.stackSize - The maximum stacksize each slot can havetankSize - Size (mB) of the tank.tankName - Internal name of the tank.public TankInventoryTileEntity(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.public TankInventoryTileEntity(int inventorySize,
java.lang.String inventoryName,
int stackSize,
int tankSize,
java.lang.String tankName,
net.minecraftforge.fluids.Fluid acceptedFluid)
inventorySize - Amount of slots in the inventory.inventoryName - Internal name of the inventory.stackSize - The maximum stacksize each slot can havetankSize - Size (mB) of the tank.tankName - Internal name of the tank.acceptedFluid - Type of Fluid to accept.protected SingleUseTank newTank(java.lang.String tankName, int tankSize)
public SingleUseTank getTank()
public void readFromNBT(net.minecraft.nbt.NBTTagCompound data)
readFromNBT in class InventoryTileEntitypublic void writeToNBT(net.minecraft.nbt.NBTTagCompound data)
writeToNBT in class InventoryTileEntitypublic int fill(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.FluidStack resource,
boolean doFill)
fill in interface net.minecraftforge.fluids.IFluidHandlerpublic int fill(net.minecraftforge.fluids.FluidStack resource,
boolean doFill)
resource - FluidStack representing the Fluid and maximum amount of fluid to be filled.doFill - If false, fill will only be simulated.public net.minecraftforge.fluids.FluidStack drain(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.FluidStack resource,
boolean doDrain)
drain in interface net.minecraftforge.fluids.IFluidHandlerpublic net.minecraftforge.fluids.FluidStack drain(net.minecraftforge.fluids.FluidStack resource,
boolean doDrain)
resource - FluidStack representing the Fluid and maximum amount of fluid to be drained.doDrain - If false, drain will only be simulated.public net.minecraftforge.fluids.FluidStack drain(net.minecraftforge.common.util.ForgeDirection from,
int maxDrain,
boolean doDrain)
drain in interface net.minecraftforge.fluids.IFluidHandlerpublic net.minecraftforge.fluids.FluidStack drain(int maxDrain,
boolean doDrain)
maxDrain - Maximum amount of fluid to drain.doDrain - If false, drain will only be simulated.public boolean canFill(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.Fluid fluid)
canFill in interface net.minecraftforge.fluids.IFluidHandlerpublic boolean canDrain(net.minecraftforge.common.util.ForgeDirection from,
net.minecraftforge.fluids.Fluid fluid)
canDrain in interface net.minecraftforge.fluids.IFluidHandlerpublic net.minecraftforge.fluids.FluidTankInfo[] getTankInfo(net.minecraftforge.common.util.ForgeDirection from)
getTankInfo in interface net.minecraftforge.fluids.IFluidHandlerpublic boolean isSendUpdateOnTankChanged()
public void setSendUpdateOnTankChanged(boolean sendUpdateOnTankChanged)
sendUpdateOnTankChanged - If it should send block updates.protected void onSendUpdate()
EvilCraftTileEntityonSendUpdate in class EvilCraftTileEntity