Jump to content

Using the oredictionary...


dwinget2008

Recommended Posts

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?

Link to comment
Share on other sites

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.

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.

Announcements



×
×
  • Create New...

Important Information

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