public class OreDictionary
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
OreDictionary.OreRegisterEvent |
Modifier and Type | Field and Description |
---|---|
static java.util.ArrayList<ItemStack> |
EMPTY_LIST |
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 stack)
Deprecated.
|
static int |
getOreID(java.lang.String name)
Gets the integer ID for the specified ore name.
|
static int[] |
getOreIDs(ItemStack stack)
Gets all the integer ID for the ores that the specified item stakc is registered to.
|
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)
Deprecated.
|
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 |
rebakeMap() |
static void |
registerOre(int id,
Block ore)
Deprecated.
|
static void |
registerOre(int id,
Item ore)
Deprecated.
|
static void |
registerOre(int id,
ItemStack ore)
Deprecated.
|
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 java.util.ArrayList<ItemStack> EMPTY_LIST
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 string@Deprecated public static int getOreID(ItemStack stack)
stack
- The item stack of the ore.public static int[] getOreIDs(ItemStack stack)
stack
- 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()
@Deprecated 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)
@Deprecated public static void registerOre(int id, Item ore)
@Deprecated public static void registerOre(int id, Block ore)
@Deprecated public static void registerOre(int id, ItemStack ore)
public static void rebakeMap()