public class FluidTankProperties extends java.lang.Object implements IFluidTankProperties
IFluidTankProperties
.Modifier and Type | Field and Description |
---|---|
private boolean |
canDrain |
private boolean |
canFill |
private int |
capacity |
private FluidStack |
contents |
Constructor and Description |
---|
FluidTankProperties(FluidStack contents,
int capacity) |
FluidTankProperties(FluidStack contents,
int capacity,
boolean canFill,
boolean canDrain) |
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.
|
static FluidTankProperties[] |
convert(FluidTankInfo[] fluidTankInfos) |
int |
getCapacity() |
FluidStack |
getContents() |
@Nullable private final FluidStack contents
private final int capacity
private final boolean canFill
private final boolean canDrain
public FluidTankProperties(@Nullable FluidStack contents, int capacity)
public FluidTankProperties(@Nullable FluidStack contents, int capacity, boolean canFill, boolean canDrain)
public static FluidTankProperties[] convert(FluidTankInfo[] fluidTankInfos)
@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