public class OreDictionary
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
OreDictionary.OreRegisterEvent |
Modifier and Type | Field and Description |
---|---|
static int |
WILDCARD_VALUE
Minecraft changed from -1 to Short.MAX_VALUE in 1.5 release for the "block wildcard".
|
Constructor and Description |
---|
OreDictionary() |
Modifier and Type | Method and Description |
---|---|
static int |
getOreID(ItemStack itemStack)
Gets the integer ID for the specified item stack.
|
static int |
getOreID(java.lang.String name)
Gets the integer ID for the specified ore name.
|
static java.lang.String |
getOreName(int id)
Reverse of getOreID, will not create new entries.
|
static java.lang.String[] |
getOreNames()
Retrieves a list of all unique ore names that are already registered.
|
static java.util.ArrayList<ItemStack> |
getOres(java.lang.Integer id)
Retrieves the ArrayList of items that are registered to this ore type.
|
static java.util.ArrayList<ItemStack> |
getOres(java.lang.String name)
Retrieves the ArrayList of items that are registered to this ore type.
|
static void |
initVanillaEntries() |
static boolean |
itemMatches(ItemStack target,
ItemStack input,
boolean strict) |
static void |
registerOre(int id,
Block ore) |
static void |
registerOre(int id,
Item ore) |
static void |
registerOre(int id,
ItemStack ore) |
static void |
registerOre(java.lang.String name,
Block ore) |
static void |
registerOre(java.lang.String name,
Item ore) |
static void |
registerOre(java.lang.String name,
ItemStack ore) |
public static final int WILDCARD_VALUE
public static void initVanillaEntries()
public static int getOreID(java.lang.String name)
name
- The unique name for this ore 'oreIron', 'ingotIron', etc..public static java.lang.String getOreName(int id)
id
- The ID to translate to a stringpublic static int getOreID(ItemStack itemStack)
itemStack
- The item stack of the ore.public static java.util.ArrayList<ItemStack> getOres(java.lang.String name)
name
- The ore name, directly calls getOreIDpublic static java.lang.String[] getOreNames()
public static java.util.ArrayList<ItemStack> getOres(java.lang.Integer id)
id
- The ore ID, see getOreIDpublic static void registerOre(java.lang.String name, Item ore)
public static void registerOre(java.lang.String name, Block ore)
public static void registerOre(java.lang.String name, ItemStack ore)
public static void registerOre(int id, Item ore)
public static void registerOre(int id, Block ore)
public static void registerOre(int id, ItemStack ore)