YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraftforge.liquids.LiquidTank Class Reference
Inheritance diagram for net.minecraftforge.liquids.LiquidTank:
net.minecraftforge.liquids.ILiquidTank

Public Member Functions

 LiquidTank (int capacity)
 
 LiquidTank (int liquidId, int quantity, int capacity)
 
 LiquidTank (int liquidId, int quantity, int capacity, TileEntity tile)
 
 LiquidTank (LiquidStack liquid, int capacity)
 
 LiquidTank (LiquidStack liquid, int capacity, TileEntity tile)
 
LiquidStack getLiquid ()
 
int getCapacity ()
 
void setLiquid (LiquidStack liquid)
 
void setCapacity (int capacity)
 
int fill (LiquidStack resource, boolean doFill)
 
LiquidStack drain (int maxDrain, boolean doDrain)
 
int getTankPressure ()
 
void setTankPressure (int pressure)
 
String getLiquidName ()
 
boolean containsValidLiquid ()
 
NBTTagCompound writeToNBT (NBTTagCompound nbt)
 
LiquidTank readFromNBT (NBTTagCompound nbt)
 

Detailed Description

Reference implementation of ILiquidTank. Use this or implement your own.

Constructor & Destructor Documentation

net.minecraftforge.liquids.LiquidTank.LiquidTank ( int  capacity)
net.minecraftforge.liquids.LiquidTank.LiquidTank ( int  liquidId,
int  quantity,
int  capacity 
)
net.minecraftforge.liquids.LiquidTank.LiquidTank ( int  liquidId,
int  quantity,
int  capacity,
TileEntity  tile 
)
net.minecraftforge.liquids.LiquidTank.LiquidTank ( LiquidStack  liquid,
int  capacity 
)
net.minecraftforge.liquids.LiquidTank.LiquidTank ( LiquidStack  liquid,
int  capacity,
TileEntity  tile 
)

Member Function Documentation

boolean net.minecraftforge.liquids.LiquidTank.containsValidLiquid ( )
LiquidStack net.minecraftforge.liquids.LiquidTank.drain ( int  maxDrain,
boolean  doDrain 
)
Parameters
maxDrain
doDrain
Returns
Null if nothing was drained, otherwise a LiquidStack containing the drained.

Implements net.minecraftforge.liquids.ILiquidTank.

int net.minecraftforge.liquids.LiquidTank.fill ( LiquidStack  resource,
boolean  doFill 
)
Parameters
resource
doFill
Returns
Amount of liquid used for filling.

Implements net.minecraftforge.liquids.ILiquidTank.

int net.minecraftforge.liquids.LiquidTank.getCapacity ( )
Returns
capacity of this tank

Implements net.minecraftforge.liquids.ILiquidTank.

LiquidStack net.minecraftforge.liquids.LiquidTank.getLiquid ( )
Returns
LiquidStack representing the liquid contained in the tank, null if empty.

Implements net.minecraftforge.liquids.ILiquidTank.

String net.minecraftforge.liquids.LiquidTank.getLiquidName ( )
int net.minecraftforge.liquids.LiquidTank.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

Implements net.minecraftforge.liquids.ILiquidTank.

LiquidTank net.minecraftforge.liquids.LiquidTank.readFromNBT ( NBTTagCompound  nbt)
void net.minecraftforge.liquids.LiquidTank.setCapacity ( int  capacity)
void net.minecraftforge.liquids.LiquidTank.setLiquid ( LiquidStack  liquid)
void net.minecraftforge.liquids.LiquidTank.setTankPressure ( int  pressure)
NBTTagCompound net.minecraftforge.liquids.LiquidTank.writeToNBT ( NBTTagCompound  nbt)

The documentation for this class was generated from the following file: