public class VoidFluidHandler extends java.lang.Object implements IFluidHandler, IFluidTank
Modifier and Type | Field and Description |
---|---|
static EmptyFluidHandler |
INSTANCE |
Constructor and Description |
---|
VoidFluidHandler() |
Modifier and Type | Method and Description |
---|---|
FluidStack |
drain(FluidStack resource,
boolean doDrain)
Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
|
FluidStack |
drain(int maxDrain,
boolean doDrain)
Drains fluid out of internal tanks, distribution is left entirely to the IFluidHandler.
|
int |
fill(FluidStack resource,
boolean doFill)
Fills fluid into internal tanks, distribution is left entirely to the IFluidHandler.
|
int |
getCapacity() |
FluidStack |
getFluid() |
int |
getFluidAmount() |
FluidTankInfo |
getInfo()
Returns a wrapper object
FluidTankInfo containing the capacity of the tank and the
FluidStack it holds. |
IFluidTankProperties[] |
getTankProperties()
Returns an array of objects which represent the internal tanks.
|
public static final EmptyFluidHandler INSTANCE
public IFluidTankProperties[] getTankProperties()
IFluidHandler
getTankProperties
in interface IFluidHandler
@Nullable public FluidStack getFluid()
getFluid
in interface IFluidTank
public int getFluidAmount()
getFluidAmount
in interface IFluidTank
public int getCapacity()
getCapacity
in interface IFluidTank
public FluidTankInfo getInfo()
IFluidTank
FluidTankInfo
containing the capacity of the tank and the
FluidStack it holds.
Should prevent manipulation of the IFluidTank. See FluidTank
.getInfo
in interface IFluidTank
public int fill(FluidStack resource, boolean doFill)
IFluidHandler
fill
in interface IFluidHandler
fill
in interface IFluidTank
resource
- FluidStack representing the Fluid and maximum amount of fluid to be filled.doFill
- If false, fill will only be simulated.public FluidStack drain(FluidStack resource, boolean doDrain)
IFluidHandler
drain
in interface IFluidHandler
resource
- FluidStack representing the Fluid and maximum amount of fluid to be drained.doDrain
- If false, drain will only be simulated.public FluidStack drain(int maxDrain, boolean doDrain)
IFluidHandler
drain
in interface IFluidHandler
drain
in interface IFluidTank
maxDrain
- Maximum amount of fluid to drain.doDrain
- If false, drain will only be simulated.