ILiquidTankProperties - friendlyhj/ZenUtils GitHub Wiki

ILiquidTankProperties

Simplified Read-only Information about the internals of an IFluidHandler.

Importing the package

You'd better import the package to avoid errors and write script easier.

import mods.zenutils.ILiquidTankProperties;

ZenGetters

Name Type Description
contents ILiquidStack A copy of the fluid contents of this tank. May be null.
capacity int The maximum amount of fluid this tank can hold, in millibuckets.
canFill boolean Returns true if the tank can be filled at any time (even if it is currently full).
canDrain boolean Returns true if the tank can be drained at any time (even if it is currently empty).

ZenMethods

Returns true if the tank can be filled with a specific type of fluid. Used as a filter for fluid types. Does not consider the current contents or capacity of the tank, only whether it could ever fill with this type of fluid. ILiquidStack is used here because fluid properties can depend on NBT, the amount is ignored.

boolean canFillFluidType(ILiquidStack liquidStack);

Returns true if the tank can drain out this a specific of fluid. Used as a filter for fluid types. Does not consider the current contents or capacity of the tank, only whether it could ever drain out this type of fluid. ILiquidStack is used here because fluid properties can depend on NBT, the amount is ignored.

boolean canDrainFluidType(ILiquidStack liquidStack);

⚠️ **GitHub.com Fallback** ⚠️