I have made a mod which adds an item which has several metadata sub-items, and I am trying to register an individual sub-item with the Ore Dictionary, like so:
OreDictionary.registerOre("gemAmber", new ItemStack(item, 1, 0));
OreDictionary.registerOre("gemRoseQuartz", new ItemStack(item, 1, 1));
OreDictionary.registerOre("ingotAluminium", new ItemStack(item, 1, 2));
This is in the main initialization method of my mod (which has several other things in it which all work).
Then, I am trying to register a recipe which uses the aluminium ingot in a bucket recipe. I have tried two methods:
List<ItemStack> list = OreDictionary.getOres("ingotAluminium");
for(int i = 0; i < list.size(); i++){
GameRegistry.addRecipe(new ItemStack(Items.bucket), new Object[]{"i i", " i ", 'i', list.get(i)});
}
and also
GameRegistry.addRecipe(new ShapedOreRecipe(Items.bucket, new Object[]{"i i", " i ", 'i', "ingotAluminium"}));
Neither of them work, which suggests its a problem with my registering. Is it just impossible to register metadata items with the Ore Dictionary or am I doing something wrong?
Thanks.