Jump to content

[1.12.2] Shapeless Ore Recipes w/ Single Ingredient Type can be Substituted for Any Item


SnowShock35

Recommended Posts

Hi there,

 

I believe to have uncovered a bug in Minecraft Forge. Either that or I've misunderstood how to create shapeless ore recipes - apologies in advanced if I have. Below I've tried to describe the issue in as much detail as I could I hope the information included contains all the necessary information. 

 

  • Java 1.8.0_131 (64 bit)

  • Minecraft 1.12.2

  • Minecraft Forge 14.23.1.2554

 

In my setup, I'm using the example mod which is packaged with the Minecraft Forge MDK (version information stated above). I've added a singular shapeless ore recipe at the path specified in figure 1 (Recipe filename is figure 2). Within the JSON file I've created (figure 3) what I know to be the correct syntax for a Forge shapeless ore recipe . My recipe example is 3 gravel to 1 flint.

 

Now that I've created my recipe I've loaded up the game,  created a single player world, and attempted to craft the recipe (both crafting table and in inventory). The recipe, as expected, works perfectly fine. However, if I should substitute any of the ingredients of the recipe with any other item I'm presented with my recipe in the output slot once more.

 

Note: For the substitution to work I still must have the correct quantity of the item required normally for the recipe when crafting with substitutes otherwise the recipe will not work. This can be seen visually in figure 7.

 

So, why does this happen? I have two hypothesis as to why this occurs, they are:

 

  1. When parsing the recipe, it fails to check that all the ingredients are the correct item.
  2. The recipe file doesn't correctly pick up the ore dict reference (e.g. gravel, ingotIron, stickWood, etc.)
  3. The recipe is parsed as "correct" because the correct amount of the singular ingredient required for the recipe appears in a single item stack 

 

I could be completely wrong. Probably am. All I know for sure is this is weird behaviour that you wouldn't expect. 

 

Figure 1 - The file path to the recipe JSON.

src/main/resources/assets/examplemod/recipes/

 

Figure 2 - The filename of the recipe JSON.

flint.json

 

Figure 3 - The JSON itself.

https://gist.github.com/anonymous/563e066652a2d3c321d0155ae2739f82

 

Figure 4 - Crafting the recipe with the correct ingredients in a crafting table.

https://ss.blamesnow.co.uk/2017/11/1511721182-adfbcb58.gif

 

Figure 5 - Crafting the recipe with the correct ingredients in the player crafting window.

https://ss.blamesnow.co.uk/2017/11/1511721281-45573e89.gif

 

Figure 6 - Crafting the recipe with the incorrect ingredients in a crafting table.

https://ss.blamesnow.co.uk/2017/11/1511721364-593bdcc2.gif

 

Figure 7 - Crafting the recipe with the incorrect ingredients in the player crafting window.

https://ss.blamesnow.co.uk/2017/11/1511721487-cfee540b.gif

width=16 height=16

http://i.imgur.com/4MIQrE0.png[/img] Feed the Beast Modpack Developer & Maintainer width=16 height=16http://i.imgur.com/6RNctNx.png[/img]

Front End Developer -|- Modpack Developer -|- Winner of Jampacked 2

UK - https://twitter.com/SnowShock35

Link to comment
Share on other sites

There was a custom shapeless recipe matching system added in Forge 1.12.2-14.23.0.2552. Maybe there's a bug in there. Can you try with a version below that?

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

Just now, larsgerrits said:

There was a custom shapeless recipe matching system added in Forge 1.12.2-14.23.0.2552. Maybe there's a bug in there. Can you try with a version below that?

The bug occurs in any build above 14.23.0.2531 - It's been on my to do list to report this for a while. - I've seen several recipe related PR's and changes in the Forge changelog which I assumed fixed the issue but every time there was no success. Hence reporting it here. 

width=16 height=16

http://i.imgur.com/4MIQrE0.png[/img] Feed the Beast Modpack Developer & Maintainer width=16 height=16http://i.imgur.com/6RNctNx.png[/img]

Front End Developer -|- Modpack Developer -|- Winner of Jampacked 2

UK - https://twitter.com/SnowShock35

Link to comment
Share on other sites

Thanks for actually reporting it. We've been trying to track down all the edge cases. I was able to reproduce this on my end.

It's happening in Vanilla code, so im seeing if I can isolate as much as I can. Then i'll report it to Grum and have him fix it in vanilla. While I fix it in 1.12.2.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

No problem. I thought I remember seeing you mention this somewhere else. On a PR perhaps?

 

It's a really strange issue that's for sure. My solution for now is to find any recipes with this problem and remove them then re-add them using CraftTweaker since it doesn't have this problem. While not ideal it's the best bet for now especially since a lot of mods are updating their minimum Forge version to the new recommended build and I wanna keep mods up to date in packs as well as use the recommended version myself to take advantage of things that have been fixed as well as the new features e.g. the commands. 

width=16 height=16

http://i.imgur.com/4MIQrE0.png[/img] Feed the Beast Modpack Developer & Maintainer width=16 height=16http://i.imgur.com/6RNctNx.png[/img]

Front End Developer -|- Modpack Developer -|- Winner of Jampacked 2

UK - https://twitter.com/SnowShock35

Link to comment
Share on other sites

8 minutes ago, LexManos said:

Solved for now by forcing it to use my matching system, so use 2555. I've passed this along to those that need it so we can make sure its fixed for 1.13.

Thanks a ton Lex. 

width=16 height=16

http://i.imgur.com/4MIQrE0.png[/img] Feed the Beast Modpack Developer & Maintainer width=16 height=16http://i.imgur.com/6RNctNx.png[/img]

Front End Developer -|- Modpack Developer -|- Winner of Jampacked 2

UK - https://twitter.com/SnowShock35

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.