net.minecraftforge.liquids
Class LiquidDictionary

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

public abstract class LiquidDictionary
extends Object

When creating liquids you should register them with this class.

Author:
CovertJaguar

Nested Class Summary
static class LiquidDictionary.LiquidRegisterEvent
          Fired when a new liquid is created
 
Constructor Summary
LiquidDictionary()
           
 
Method Summary
static LiquidStack getLiquid(String name, int amount)
          Returns the liquid matching the name, if such a liquid exists.
static Map<String,LiquidStack> getLiquids()
          Get an immutable list of the liquids defined
static LiquidStack getOrCreateLiquid(String name, LiquidStack liquid)
          When creating liquids you should call this function.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiquidDictionary

public LiquidDictionary()
Method Detail

getOrCreateLiquid

public static LiquidStack getOrCreateLiquid(String name,
                                            LiquidStack liquid)
When creating liquids you should call this function. Upon passing it a name and liquid item it will return either a preexisting implementation of that liquid or the liquid passed in.

Parameters:
name - the name of the liquid
liquid - the liquid to use if one doesn't exist
Returns:

getLiquid

public static LiquidStack getLiquid(String name,
                                    int amount)
Returns the liquid matching the name, if such a liquid exists. Can return null.

Parameters:
name - the name of the liquid
amount - the amout of liquid
Returns:

getLiquids

public static Map<String,LiquidStack> getLiquids()
Get an immutable list of the liquids defined

Returns:
the defined liquids