TileFluidHandler
@Deprecated public class TileFluidHandler extends TileEntity implements IFluidHandler
IFluidHandler
. Use/extend this or write your own.Modifier and Type | Field and Description |
---|---|
protected FluidTank |
tank
Deprecated.
|
blockType, INFINITE_EXTENT_AABB, pos, tileEntityInvalid, worldObj
Constructor and Description |
---|
TileFluidHandler()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canDrain(EnumFacing from,
Fluid fluid)
Deprecated.
Returns true if the given fluid can be extracted from the given direction.
|
boolean |
canFill(EnumFacing from,
Fluid fluid)
Deprecated.
Returns true if the given fluid can be inserted into the given direction.
|
FluidStack |
drain(EnumFacing from,
FluidStack resource,
boolean doDrain)
Deprecated.
Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
|
FluidStack |
drain(EnumFacing from,
int maxDrain,
boolean doDrain)
Deprecated.
Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
|
int |
fill(EnumFacing from,
FluidStack resource,
boolean doFill)
Deprecated.
Fills fluid into internal tanks, distribution is left entirely to the IFluidHandler.
|
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Deprecated.
Retrieves the handler for the capability requested on the specific side.
|
FluidTankInfo[] |
getTankInfo(EnumFacing from)
Deprecated.
Returns an array of objects which represent the internal tanks.
|
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Deprecated.
Determines if this object has support for the capability in question on the specific side.
|
void |
readFromNBT(NBTTagCompound tag)
Deprecated.
|
NBTTagCompound |
writeToNBT(NBTTagCompound tag)
Deprecated.
|
addInfoToCrashReport, addMapping, canRenderBreaking, create, deserializeNBT, getBlockMetadata, getBlockType, getDisplayName, getDistanceSq, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getUpdatePacket, getUpdateTag, getWorld, handleUpdateTag, hasFastRenderer, hasWorldObj, invalidate, isInvalid, markDirty, mirror, onChunkUnload, onDataPacket, onLoad, onlyOpsCanSetNbt, receiveClientEvent, restrictNBTCopy, rotate, serializeNBT, setPos, setWorldCreate, setWorldObj, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validate
protected FluidTank tank
public void readFromNBT(NBTTagCompound tag)
readFromNBT
in class TileEntity
public NBTTagCompound writeToNBT(NBTTagCompound tag)
writeToNBT
in class TileEntity
public int fill(EnumFacing from, FluidStack resource, boolean doFill)
IFluidHandler
fill
in interface IFluidHandler
from
- 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(EnumFacing from, FluidStack resource, boolean doDrain)
IFluidHandler
drain
in interface IFluidHandler
from
- 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(EnumFacing from, int maxDrain, boolean doDrain)
IFluidHandler
drain
in interface IFluidHandler
from
- Orientation the fluid is drained to.maxDrain
- Maximum amount of fluid to drain.doDrain
- If false, drain will only be simulated.public boolean canFill(EnumFacing from, Fluid fluid)
IFluidHandler
canFill
in interface IFluidHandler
public boolean canDrain(EnumFacing from, Fluid fluid)
IFluidHandler
canDrain
in interface IFluidHandler
public FluidTankInfo[] getTankInfo(EnumFacing from)
IFluidHandler
FluidTankInfo
.getTankInfo
in interface IFluidHandler
from
- Orientation determining which tanks should be queried.public boolean hasCapability(Capability<?> capability, @Nullable EnumFacing facing)
ICapabilityProvider
hasCapability
in interface ICapabilityProvider
hasCapability
in class TileEntity
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class TileEntity
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'