destruc7i0n / crafting

Website for generating Minecraft crafting recipe JSON files
https://crafting.thedestruc7i0n.ca/
MIT License
59 stars 8 forks source link

Similar shaped recipes are getting processed as duplicate/shapeless #29

Open allanonmage opened 1 year ago

allanonmage commented 1 year ago

I'm trying to build some recipes to recycle arrows out of a mob farm. I'd like 3 recipes, one each to extract sticks, flint, and feathers. I've tried shapeless and shaped, and while they do work if I the user select them, they don't work like they are supposed to.

I have a mod installed that can do automated crafting, but you can't pick a recipe, just place a filter in a 3x3 grid and it goes with the first recipe of its choosing that matches. Therefore, I made 3 different shaped recipes that had the arrow in different places (left top, left middle, left bottom). In the regular crafting table, Polymorph sees them as the same recipe, so it activated its button to let me switch between them. I then made similar recipes, but with a row of arrows. The automated crafting table also sees all three recipes as the same, and gives the same output for all 3 different scenarios. The row recipes are below.

Given that these are shaped recipes, I presumed that the spaces mean, you know, that the block had to be empty. I wasn't able to find any documentation. What I did find seemed weird, so maybe it was for bedrock, but that weird MS page and a couple forum posts confirmed that space is supposed to be an empty place in the crafting table. I am only able to find your generator; I kind of expected there to be others so I could compare the output from another one. Looking at the JSON, and comparing to other recipes, I presume the game is doing some kind of optimization or something? Maybe? I do have several mods installed, but the only one that touches recipes is Polymorph.

I guess I can do 1, 2, 3 arrows to seperate them as seperate recipes, unless you can see what they syntax error is.

Since you're the only source of documentation I have on recipe JSON, what do you think about this shaped recipe problem?

{ "type": "minecraft:crafting_shaped", "pattern": [ "###", " ", " " ], "key": { "#": { "item": "minecraft:arrow" } }, "result": { "item": "minecraft:stick", "count": 3 }, "group": "Arrow" }

{ "type": "minecraft:crafting_shaped", "pattern": [ " ", "###", " " ], "key": { "#": { "item": "minecraft:arrow" } }, "result": { "item": "minecraft:flint", "count": 3 }, "group": "Arrow" }

{ "type": "minecraft:crafting_shaped", "pattern": [ " ", " ", "###" ], "key": { "#": { "item": "minecraft:arrow" } }, "result": { "item": "minecraft:feather", "count": 3 }, "group": "Arrow" }

destruc7i0n commented 1 year ago

Hey, sorry for the delay. From what I know the spaces do tell the game that there should not be anything in that spot. I have an option for crafting to automatically fill out the spaces too (Exactly where placed). Have you tried asking the mod creator about the issue? Feel free to close as well if you have resolved this by now.

allanonmage commented 1 year ago

I don't know which mod you're referring to, nor do I think that either are getting in the way. They're just adjacent to crafting recipes.

destruc7i0n commented 12 months ago

As far as I know the syntax for recipes has not changed much since they were first introduced. I checked the deobfuscated code with the mappings and it does appear to still be the case. I am not exactly sure why the mod only outputs the first recipe. Maybe try to separate them (as you mentioned) or remove the grouping?