Jump to content

[Solved] Negating mirrored crafting recipes [1.5.2]


larsgerrits

Recommended Posts

So, I've made some crafting recipes, and they are crafted the opposite way. But if I craft both of them they return one and the same block.

 

First crafting recipe:

"YXX","YXX","YXX"

And the second crafting recipe:

"XXY","XXY","XXY"

 

So, if I craft them like so: "YXX","YXX","YXX" and so: "XXY","XXY","XXY", they return the block of the first crafting recipe.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

No, its a bit hard to understand. So, if i wanna craft a block with this recipe: "YXX","YXX","YXX" I get the proper block. But if I craft ablock with this recipe: "XXY","XXY","XXY" i get the same block as the first one. That's because the two recipes are mirrored.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Negating it. So that it gives me 2 different blocks instead of the same one.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

That behaviour is hardcoded in ShapedRecipes. Create your own Recipe class, remove the mirroring check (line 54), and use that class for your recipes.

 

So i made a new recipes class and a new CraftingManager class, but do you know where it is called?

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

That behaviour is hardcoded in ShapedRecipes. Create your own Recipe class, remove the mirroring check (line 54), and use that class for your recipes.

 

So i made a new recipes class and a new CraftingManager class, but do you know where it is called?

You don't need a new CraftingManager. Just create your own class which implements IRecipe, copy the ShapedRecipe code, and remove the mirroring check. Then use GameRegistry.addRecipe(new MyRecipe(args));

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

Link to comment
Share on other sites

And what would i put as my arguments? If I hover over this line: GameRegistry.addRecipe(new BDShapedRecipes()); it sais: Add arguments to match 'BDShapedRecipes(int, int, ItemStack[], ItemStack)'.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

  • 9 months later...

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.