public class FluidTankPropertiesWrapper extends java.lang.Object implements IFluidTankProperties
IFluidTankProperties
wrapper for FluidTank
.Constructor and Description |
---|
FluidTankPropertiesWrapper(FluidTank tank) |
Modifier and Type | Method and Description |
---|---|
boolean |
canDrain()
Returns true if the tank can be drained at any time (even if it is currently empty).
|
boolean |
canDrainFluidType(FluidStack fluidStack)
Returns true if the tank can drain out this a specific of fluid.
|
boolean |
canFill()
Returns true if the tank can be filled at any time (even if it is currently full).
|
boolean |
canFillFluidType(FluidStack fluidStack)
Returns true if the tank can be filled with a specific type of fluid.
|
int |
getCapacity() |
FluidStack |
getContents() |
protected final FluidTank tank
public FluidTankPropertiesWrapper(FluidTank tank)
@Nullable public FluidStack getContents()
getContents
in interface IFluidTankProperties
IFluidHandler
.public int getCapacity()
getCapacity
in interface IFluidTankProperties
public boolean canFill()
IFluidTankProperties
canFill
in interface IFluidTankProperties
public boolean canDrain()
IFluidTankProperties
canDrain
in interface IFluidTankProperties
public boolean canFillFluidType(FluidStack fluidStack)
IFluidTankProperties
FluidStack
is used here because fluid properties can depend on NBT, the amount is ignored.canFillFluidType
in interface IFluidTankProperties
public boolean canDrainFluidType(FluidStack fluidStack)
IFluidTankProperties
FluidStack
is used here because fluid properties can depend on NBT, the amount is ignored.canDrainFluidType
in interface IFluidTankProperties