|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraftforge.liquids.LiquidTank
public class LiquidTank
Reference implementation of ILiquidTank. Use this or implement your own.
Constructor Summary | |
---|---|
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)
|
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)
This method should not be used to interact with a foreign tank. |
void |
setLiquid(LiquidStack liquid)
These shouldn't be used to interact with a foreign tank. |
void |
setTankPressure(int pressure)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LiquidTank(int capacity)
public LiquidTank(int liquidId, int quantity, int capacity)
public LiquidTank(int liquidId, int quantity, int capacity, TileEntity tile)
public LiquidTank(LiquidStack liquid, int capacity)
public LiquidTank(LiquidStack liquid, int capacity, TileEntity tile)
Method Detail |
---|
public LiquidStack getLiquid()
getLiquid
in interface ILiquidTank
public void setLiquid(LiquidStack liquid)
ILiquidTank
ILiquidTank.fill(LiquidStack, boolean)
and ILiquidTank.drain(int, boolean)
.
setLiquid
in interface ILiquidTank
public void setCapacity(int capacity)
ILiquidTank
ILiquidTank.fill(LiquidStack, boolean)
and ILiquidTank.drain(int, boolean)
.
setCapacity
in interface ILiquidTank
public int getCapacity()
getCapacity
in interface ILiquidTank
public int fill(LiquidStack resource, boolean doFill)
fill
in interface ILiquidTank
public LiquidStack drain(int maxDrain, boolean doDrain)
drain
in interface ILiquidTank
public int getTankPressure()
ILiquidTank
getTankPressure
in interface ILiquidTank
public void setTankPressure(int pressure)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |