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 know how to use the oredictionary for crafting. But my question is a little more advanced than just:

 

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Block.planks, 2, 0), new Object[] {"%", '%', "logWood"}));

 

for example.

 

I would like to be able to do something like this:

 

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack("plankWood"), new Object[] {"%", '%', "logWood"});

 

I know that the code here is wrong because there needs to be a block in the place of "plankWood" rather than a string. I have tried using:

 

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Block.wood, 1, WILDCARD_VALUE));, new Object[] {"%", '%', "logWood"});

 

and this works, but it will only ever give out Oak wood as the result rather than the proper planks.

 

Does any one have any thought on how to correct this?

That can't work.

The base principle of crafting is to return a defined result, not a "general" item.

 

What is the "proper" planks anyway ?

  • Author

If you put in an oak log you get oak planks, if you put in jungle logs you get jungle planks..... (proper)

 

Ok well that suck then. I was hoping that there was a way to do this. I wanted to take into account other mods that might add trees and logs to the game. I guess that I will have to think ahead and just add their recipes to my mode from their API code.

 

Thanks.

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.