YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraftforge.liquids.LiquidStack Class Reference

Public Member Functions

 LiquidStack (int itemID, int amount)
 
 LiquidStack (Item item, int amount)
 
 LiquidStack (Block block, int amount)
 
 LiquidStack (int itemID, int amount, int itemDamage)
 
 LiquidStack (int itemID, int amount, int itemDamage, NBTTagCompound nbt)
 
NBTTagCompound writeToNBT (NBTTagCompound nbt)
 
void readFromNBT (NBTTagCompound nbt)
 
LiquidStack copy ()
 
boolean isLiquidEqual (LiquidStack other)
 
boolean containsLiquid (LiquidStack other)
 
boolean isLiquidEqual (ItemStack other)
 
ItemStack asItemStack ()
 
String getTextureSheet ()
 
LiquidStack setTextureSheet (String textureSheet)
 
Icon getRenderingIcon ()
 
LiquidStack setRenderingIcon (Icon icon)
 
final int hashCode ()
 
final boolean equals (Object ob)
 
LiquidStack canonical ()
 

Static Public Member Functions

static LiquidStack loadLiquidStackFromNBT (NBTTagCompound nbt)
 

Public Attributes

final int itemID
 
int amount
 
final int itemMeta
 
NBTTagCompound extra
 

Detailed Description

ItemStack substitute for liquids Things of note: they are equal if their items are equal. Amount does NOT matter for java equals() testing
The canonical liquidstack is probably the only one that has a lot of the rendering data on it. Use canonical() to get it.

Author
SirSengir

Constructor & Destructor Documentation

net.minecraftforge.liquids.LiquidStack.LiquidStack ( int  itemID,
int  amount 
)
net.minecraftforge.liquids.LiquidStack.LiquidStack ( Item  item,
int  amount 
)
net.minecraftforge.liquids.LiquidStack.LiquidStack ( Block  block,
int  amount 
)
net.minecraftforge.liquids.LiquidStack.LiquidStack ( int  itemID,
int  amount,
int  itemDamage 
)
net.minecraftforge.liquids.LiquidStack.LiquidStack ( int  itemID,
int  amount,
int  itemDamage,
NBTTagCompound  nbt 
)

Member Function Documentation

ItemStack net.minecraftforge.liquids.LiquidStack.asItemStack ( )
Returns
ItemStack representation of this LiquidStack
LiquidStack net.minecraftforge.liquids.LiquidStack.canonical ( )

Get the canonical version of this liquid stack (will contain things like icons and texturesheets)

Returns
The canonical liquidstack
boolean net.minecraftforge.liquids.LiquidStack.containsLiquid ( LiquidStack  other)
Parameters
other
Returns
true if this LiquidStack contains the other liquid (liquids are equal and amount >= other.amount).
LiquidStack net.minecraftforge.liquids.LiquidStack.copy ( )
Returns
A copy of this LiquidStack
final boolean net.minecraftforge.liquids.LiquidStack.equals ( Object  ob)
Icon net.minecraftforge.liquids.LiquidStack.getRenderingIcon ( )

Get the rendering icon for this liquid stack, for presentation in the world or in GUIs. Defaults to handling water and lava, and returns the set rendering icon otherwise.

See getTextureSheet() to get the texture sheet this icon is associated with

Returns
The icon for rendering this liquid
String net.minecraftforge.liquids.LiquidStack.getTextureSheet ( )

Return the textureSheet used for this liquid stack's texture Icon Defaults to '/terrain.png'

See getRenderingIcon() for the actual icon

Returns
The texture sheet
final int net.minecraftforge.liquids.LiquidStack.hashCode ( )
boolean net.minecraftforge.liquids.LiquidStack.isLiquidEqual ( LiquidStack  other)
Parameters
other
Returns
true if this LiquidStack contains the same liquid as the one passed in.
boolean net.minecraftforge.liquids.LiquidStack.isLiquidEqual ( ItemStack  other)
Parameters
otherItemStack containing liquids.
Returns
true if this LiquidStack contains the same liquid as the one passed in.
static LiquidStack net.minecraftforge.liquids.LiquidStack.loadLiquidStackFromNBT ( NBTTagCompound  nbt)
static

Reads a liquid stack from the passed nbttagcompound and returns it.

Parameters
nbt
Returns
the liquid stack
void net.minecraftforge.liquids.LiquidStack.readFromNBT ( NBTTagCompound  nbt)

NO-OP now. Use loadLiquidStackFromNBT(NBTTagCompound) to get a new instance

Parameters
nbt
LiquidStack net.minecraftforge.liquids.LiquidStack.setRenderingIcon ( Icon  icon)

Set the icon for rendering this liquid It should be refreshed whenever textures are refreshed.

See also setTextureSheet(String) for setting the sheet this icon is associated with

Parameters
iconThe icon to render
Returns
The liquid stack
LiquidStack net.minecraftforge.liquids.LiquidStack.setTextureSheet ( String  textureSheet)

Set the texture sheet for this icon (usually /terrain.png or /gui/items.png)

See also the setRenderingIcon(Icon) for the icon itself

Parameters
textureSheet
Returns
the liquid stack
NBTTagCompound net.minecraftforge.liquids.LiquidStack.writeToNBT ( NBTTagCompound  nbt)

Member Data Documentation

int net.minecraftforge.liquids.LiquidStack.amount
NBTTagCompound net.minecraftforge.liquids.LiquidStack.extra
final int net.minecraftforge.liquids.LiquidStack.itemID
final int net.minecraftforge.liquids.LiquidStack.itemMeta

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