public class TileFluidHandler extends TileEntity implements IFluidHandler
IFluidHandler. Use/extend this or write your own.| Modifier and Type | Field and Description |
|---|---|
protected FluidTank |
tank |
blockMetadata, blockType, INFINITE_EXTENT_AABB, tileEntityInvalid, worldObj, xCoord, yCoord, zCoord| Constructor and Description |
|---|
TileFluidHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDrain(ForgeDirection from,
Fluid fluid)
Returns true if the given fluid can be extracted from the given direction.
|
boolean |
canFill(ForgeDirection from,
Fluid fluid)
Returns true if the given fluid can be inserted into the given direction.
|
FluidStack |
drain(ForgeDirection from,
FluidStack resource,
boolean doDrain)
Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
|
FluidStack |
drain(ForgeDirection from,
int maxDrain,
boolean doDrain)
Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
|
int |
fill(ForgeDirection from,
FluidStack resource,
boolean doFill)
Fills fluid into internal tanks, distribution is left entirely to the IFluidHandler.
|
FluidTankInfo[] |
getTankInfo(ForgeDirection from)
Returns an array of objects which represent the internal tanks.
|
void |
readFromNBT(NBTTagCompound tag) |
void |
writeToNBT(NBTTagCompound tag) |
addMapping, canUpdate, createAndLoadEntity, func_145828_a, getBlockMetadata, getBlockType, getDescriptionPacket, getDistanceFrom, getMaxRenderDistanceSquared, getRenderBoundingBox, getWorldObj, hasWorldObj, invalidate, isInvalid, markDirty, onChunkUnload, onDataPacket, receiveClientEvent, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, updateEntity, validateprotected FluidTank tank
public void readFromNBT(NBTTagCompound tag)
readFromNBT in class TileEntitypublic void writeToNBT(NBTTagCompound tag)
writeToNBT in class TileEntitypublic int fill(ForgeDirection from, FluidStack resource, boolean doFill)
IFluidHandlerfill in interface IFluidHandlerfrom - Orientation the Fluid is pumped in from.resource - FluidStack representing the Fluid and maximum amount of fluid to be filled.doFill - If false, fill will only be simulated.public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain)
IFluidHandlerdrain in interface IFluidHandlerfrom - Orientation the Fluid is drained to.resource - FluidStack representing the Fluid and maximum amount of fluid to be drained.doDrain - If false, drain will only be simulated.public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
IFluidHandlerdrain in interface IFluidHandlerfrom - Orientation the fluid is drained to.maxDrain - Maximum amount of fluid to drain.doDrain - If false, drain will only be simulated.public boolean canFill(ForgeDirection from, Fluid fluid)
IFluidHandlercanFill in interface IFluidHandlerpublic boolean canDrain(ForgeDirection from, Fluid fluid)
IFluidHandlercanDrain in interface IFluidHandlerpublic FluidTankInfo[] getTankInfo(ForgeDirection from)
IFluidHandlerFluidTankInfo.getTankInfo in interface IFluidHandlerfrom - Orientation determining which tanks should be queried.