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

Classes

class  OreRegisterEvent
 

Static Public Member Functions

static void initVanillaEntries ()
 
static int getOreID (String name)
 
static String getOreName (int id)
 
static int getOreID (ItemStack itemStack)
 
static ArrayList< ItemStackgetOres (String name)
 
static String[] getOreNames ()
 
static ArrayList< ItemStackgetOres (Integer id)
 
static boolean itemMatches (ItemStack target, ItemStack input, boolean strict)
 
static void registerOre (String name, Item ore)
 
static void registerOre (String name, Block ore)
 
static void registerOre (String name, ItemStack ore)
 
static void registerOre (int id, Item ore)
 
static void registerOre (int id, Block ore)
 
static void registerOre (int id, ItemStack ore)
 

Static Public Attributes

static final int WILDCARD_VALUE = Short.MAX_VALUE
 

Member Function Documentation

static int net.minecraftforge.oredict.OreDictionary.getOreID ( String  name)
static

Gets the integer ID for the specified ore name. If the name does not have a ID it assigns it a new one.

Parameters
nameThe unique name for this ore 'oreIron', 'ingotIron', etc..
Returns
A number representing the ID for this ore type
static int net.minecraftforge.oredict.OreDictionary.getOreID ( ItemStack  itemStack)
static

Gets the integer ID for the specified item stack. If the item stack is not linked to any ore, this will return -1 and no new entry will be created.

Parameters
itemStackThe item stack of the ore.
Returns
A number representing the ID for this ore type, or -1 if couldn't find it.
static String net.minecraftforge.oredict.OreDictionary.getOreName ( int  id)
static

Reverse of getOreID, will not create new entries.

Parameters
idThe ID to translate to a string
Returns
The String name, or "Unknown" if not found.
static String [] net.minecraftforge.oredict.OreDictionary.getOreNames ( )
static

Retrieves a list of all unique ore names that are already registered.

Returns
All unique ore names that are currently registered.
static ArrayList<ItemStack> net.minecraftforge.oredict.OreDictionary.getOres ( String  name)
static

Retrieves the ArrayList of items that are registered to this ore type. Creates the list as empty if it did not exist.

Parameters
nameThe ore name, directly calls getOreID
Returns
An arrayList containing ItemStacks registered for this ore
static ArrayList<ItemStack> net.minecraftforge.oredict.OreDictionary.getOres ( Integer  id)
static

Retrieves the ArrayList of items that are registered to this ore type. Creates the list as empty if it did not exist.

Parameters
idThe ore ID, see getOreID
Returns
An arrayList containing ItemStacks registered for this ore
static void net.minecraftforge.oredict.OreDictionary.initVanillaEntries ( )
static
static boolean net.minecraftforge.oredict.OreDictionary.itemMatches ( ItemStack  target,
ItemStack  input,
boolean  strict 
)
static
static void net.minecraftforge.oredict.OreDictionary.registerOre ( String  name,
Item  ore 
)
static
static void net.minecraftforge.oredict.OreDictionary.registerOre ( String  name,
Block  ore 
)
static
static void net.minecraftforge.oredict.OreDictionary.registerOre ( String  name,
ItemStack  ore 
)
static
static void net.minecraftforge.oredict.OreDictionary.registerOre ( int  id,
Item  ore 
)
static
static void net.minecraftforge.oredict.OreDictionary.registerOre ( int  id,
Block  ore 
)
static
static void net.minecraftforge.oredict.OreDictionary.registerOre ( int  id,
ItemStack  ore 
)
static

Member Data Documentation

final int net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE = Short.MAX_VALUE
static

Minecraft changed from -1 to Short.MAX_VALUE in 1.5 release for the "block wildcard". Use this in case it changes again.


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