Wehavecookies56 Posted September 23, 2017 Posted September 23, 2017 So in my mod I have a bunch of materials that are all the same item but with different NBT data which means in order to use them as ingredients in recipes I need to use the type minecraft:item_nbt or make a IngredientFactory, both methods cause the same issues I that I will explain after this. So here is my recipe json file first of all { "type": "forge:ore_shapeless", "ingredients": [ { "type": "minecraft:item_nbt", "item": "kk:synthesismaterial", "nbt": { "material": "sm.mythrilcrystal", "rank": "sm.rank.s" } }, { "type": "forge:ore_dict", "ore": "gemDiamond" } ], "result": { "item": "kk:mythrilinfuseddiamond" } } So as you can see it's a shapeless recipe that uses a diamond and the material from my mod with some NBT tags.The NBT sensitive ingredient works or at least appears to work fine. Now the first problem is that when using the recipe book, the diamond is placed into the crafting grid but not the material from my mod however, it will not show as craft able if you don't have the material. Only really a minor problem. A major problem I have is that the recipe will only work if my mod material is placed in the grid with a stack size of 1. As you can see in the image below the recipe works However if the stack size is greater than 1 when placed in the grid it will not work It will work though if I increase the stack size afterwards like so But after I take the result out this happens And if the stack size of the diamond is greater than 1 as well as the material from my mod the same thing happens with both If the material from my mod has a stack size of 1 but the diamonds have a stack size greater than 1 it will take 1 diamond and work as intended. So this is quite a major issue as it allows for easy duplication. I'm have no clue what's causing this but I think it's something I need to do to fix it rather than a forge/vanilla issue as I haven't seen anyone else have this issue. Any help is appreciated, thanks. Quote
Choonster Posted September 23, 2017 Posted September 23, 2017 This happens because IngredientNBT#apply uses ItemStack.areItemStacksEqualUsingNBTShareTag to check if the ItemStack argument matches the ingredient's ItemStack, but this also checks that the two ItemStacks have the same stack size. This prevents the ingredient from matching when there's a stack of two ore more of the ingredient's item in the crafting grid. I've reported this on GitHub here. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Wehavecookies56 Posted September 23, 2017 Author Posted September 23, 2017 So if I use a custom Ingredient class I should be able to fix this, thanks! Quote
Choonster Posted September 24, 2017 Posted September 24, 2017 This has been fixed in Forge 1.12.2-14.23.0.2490. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Wehavecookies56 Posted September 24, 2017 Author Posted September 24, 2017 Awesome, that was quick Quote
Recommended Posts
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.