Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

  • Author

I did, in my second example, but it didn't work. Am I doing it wrong?

  • Author

Wow I'm dim. Had all the Ore Dictionary registrations in a method which I never actually called. :P Sorry for wasting your time, thanks for the help.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.