public interface IFluidTankProperties
IFluidHandler
.
This is useful for displaying information, and as hints for interacting with it.
These properties are constant and do not depend on the fluid contents (except the contents themselves, of course).
The information here may not tell the full story of how the tank actually works,
for real fluid transactions you must use IFluidHandler
to simulate, check, and then interact.
None of the information in these properties is required to successfully interact using a IFluidHandler
.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() |
@Nullable FluidStack getContents()
IFluidHandler
.int getCapacity()
boolean canFill()
boolean canDrain()
boolean canFillFluidType(FluidStack fluidStack)
FluidStack
is used here because fluid properties can depend on NBT, the amount is ignored.boolean canDrainFluidType(FluidStack fluidStack)
FluidStack
is used here because fluid properties can depend on NBT, the amount is ignored.