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)
public FluidStack getContents()
getContents in interface IFluidTankPropertiesIFluidHandler.public int getCapacity()
getCapacity in interface IFluidTankPropertiespublic boolean canFill()
IFluidTankPropertiescanFill in interface IFluidTankPropertiespublic boolean canDrain()
IFluidTankPropertiescanDrain in interface IFluidTankPropertiespublic boolean canFillFluidType(FluidStack fluidStack)
IFluidTankPropertiesFluidStack is used here because fluid properties can depend on NBT, the amount is ignored.canFillFluidType in interface IFluidTankPropertiespublic boolean canDrainFluidType(FluidStack fluidStack)
IFluidTankPropertiesFluidStack is used here because fluid properties can depend on NBT, the amount is ignored.canDrainFluidType in interface IFluidTankProperties