net.minecraftforge.liquids
Interface ILiquidTank

All Known Implementing Classes:
LiquidTank

public interface ILiquidTank

A tank is the unit of interaction with liquid inventories.

Author:
cpw

Method Summary
 LiquidStack drain(int maxDrain, boolean doDrain)
           
 int fill(LiquidStack resource, boolean doFill)
           
 int getCapacity()
           
 LiquidStack getLiquid()
           
 int getTankPressure()
          Positive values indicate a positive liquid pressure (liquid wants to leave this tank) Negative values indicate a negative liquid pressure (liquid wants to fill this tank) Zero indicates no pressure
 void setCapacity(int capacity)
          Deprecated. 
 void setLiquid(LiquidStack liquid)
          Deprecated. 
 

Method Detail

getLiquid

LiquidStack getLiquid()
Returns:
LiquidStack representing the liquid contained in the tank, null if empty.

setLiquid

@Deprecated
void setLiquid(LiquidStack liquid)
Deprecated. 

These shouldn't be used to interact with a foreign tank. Use fill(LiquidStack, boolean) and drain(int, boolean).

Parameters:
liquid -

setCapacity

@Deprecated
void setCapacity(int capacity)
Deprecated. 

This method should not be used to interact with a foreign tank. Use fill(LiquidStack, boolean) and drain(int, boolean).

Parameters:
capacity -

getCapacity

int getCapacity()
Returns:
capacity of this tank

fill

int fill(LiquidStack resource,
         boolean doFill)
Parameters:
resource -
doFill -
Returns:
Amount of liquid used for filling.

drain

LiquidStack drain(int maxDrain,
                  boolean doDrain)
Parameters:
maxDrain -
doDrain -
Returns:
Null if nothing was drained, otherwise a LiquidStack containing the drained.

getTankPressure

int getTankPressure()
Positive values indicate a positive liquid pressure (liquid wants to leave this tank) Negative values indicate a negative liquid pressure (liquid wants to fill this tank) Zero indicates no pressure

Returns:
a number indicating tank pressure