Jump to content

[1.8] Registering metadata items with Ore Dictionary?


Jagm

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.