net.minecraftforge.liquids
Class LiquidStack
java.lang.Object
net.minecraftforge.liquids.LiquidStack
public class LiquidStack
- extends Object
ItemStack substitute for liquids
- Author:
- SirSengir
itemID
public int itemID
amount
public int amount
itemMeta
public int itemMeta
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)
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: