net.minecraftforge.liquids
Class LiquidStack

java.lang.Object
  extended by net.minecraftforge.liquids.LiquidStack

public class LiquidStack
extends Object

ItemStack substitute for liquids

Author:
SirSengir

Field Summary
 int amount
           
 int itemID
           
 int itemMeta
           
 
Constructor Summary
LiquidStack(Block block, int amount)
           
LiquidStack(int itemID, int amount)
           
LiquidStack(int itemID, int amount, int itemDamage)
           
LiquidStack(Item item, int amount)
           
 
Method Summary
 ItemStack asItemStack()
           
 boolean containsLiquid(LiquidStack other)
           
 LiquidStack copy()
           
 boolean isLiquidEqual(ItemStack other)
           
 boolean isLiquidEqual(LiquidStack other)
           
static LiquidStack loadLiquidStackFromNBT(NBTTagCompound nbt)
          Reads a liquid stack from the passed nbttagcompound and returns it.
 void readFromNBT(NBTTagCompound nbt)
           
 NBTTagCompound writeToNBT(NBTTagCompound nbt)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itemID

public int itemID

amount

public int amount

itemMeta

public int itemMeta
Constructor Detail

LiquidStack

public LiquidStack(int itemID,
                   int amount)

LiquidStack

public LiquidStack(Item item,
                   int amount)

LiquidStack

public LiquidStack(Block block,
                   int amount)

LiquidStack

public LiquidStack(int itemID,
                   int amount,
                   int itemDamage)
Method Detail

writeToNBT

public NBTTagCompound writeToNBT(NBTTagCompound nbt)

readFromNBT

public void readFromNBT(NBTTagCompound nbt)

copy

public LiquidStack copy()
Returns:
A copy of this LiquidStack

isLiquidEqual

public boolean isLiquidEqual(LiquidStack other)
Parameters:
other -
Returns:
true if this LiquidStack contains the same liquid as the one passed in.

containsLiquid

public boolean containsLiquid(LiquidStack other)
Parameters:
other -
Returns:
true if this LiquidStack contains the other liquid (liquids are equal and amount >= other.amount).

isLiquidEqual

public boolean isLiquidEqual(ItemStack other)
Parameters:
other - ItemStack containing liquids.
Returns:
true if this LiquidStack contains the same liquid as the one passed in.

asItemStack

public ItemStack asItemStack()
Returns:
ItemStack representation of this LiquidStack

loadLiquidStackFromNBT

public static LiquidStack loadLiquidStackFromNBT(NBTTagCompound nbt)
Reads a liquid stack from the passed nbttagcompound and returns it.

Parameters:
nbt -
Returns: