Nuparu00 Posted February 3, 2019 Share Posted February 3, 2019 (edited) Hi. I have wanted to add crafting recipes to my blocks/items, but I ran into a problem. If the recipe contains my custom items as ingredients, it works exactly as it should, but when the recipe uses vanilla-only items, it cannot be crafted. The recipe still appears in the "Recipe Book", but no item appears in the output slot. My only idea is that it has something to do with the advancements system, but since nowhere is mentioned anything about that, I don't think that is the case. The game does not throw any error/warning messages to the log, so I am quite clueless. I am using Forge 1.12.2-14.23.3.2676. This does work: { "type": "minecraft:crafting_shaped", "pattern": [ "S" ], "key": { "S": { "item": "sevendaystomine:smallrock" } }, "result": { "item": "sevendaystomine:woodplank" } } But this for some reason does not: { "type": "minecraft:crafting_shaped", "pattern": [ "S" ], "key": { "S": { "item": "minecraft:stick" } }, "result": { "item": "sevendaystomine:woodplank" } } EDIT: Updating to the recommended Forge 1.12.2-14.23.5.2768 did not help. I have also tried using generated recipes from https://crafting.thedestruc7i0n.ca/ and recipes from a various tutorial on the internet, but basically, as long as some of my items is not an ingredient, the recipe does not work. EDIT 2: So I have found the origin of this all. It is because I have registered my custom IRecipe classes from code, which seems to be not needed. I have removed the code that does this and now it works! Edited February 7, 2019 by Nuparu00 Solved Quote Link to comment Share on other sites More sharing options...
Cadiboo Posted February 4, 2019 Share Posted February 4, 2019 Your logs should be telling you the problem, please post them Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme) Link to comment Share on other sites More sharing options...
Nuparu00 Posted February 4, 2019 Author Share Posted February 4, 2019 The thing is, there seems to be nothing that could be related to this. The only warning messages that are there are about my textures and models: https://pastebin.com/4SxKXjid Quote Link to comment Share on other sites More sharing options...
Nuparu00 Posted February 6, 2019 Author Share Posted February 6, 2019 So I just redownloaded Forge MDK and created a new workspace and tried to make a recipe work in the example mod and it worked - after adding a .json file for a new advancement. But when I tried to replicate this in my actual workspace, it gave the same result as previous attempts. I have also tried using GameRegistry#addShapedRecipe() and RegistryEvent.Register<IRecipe>, but none of these worked at all. I do not know what to do now. I will wait and while and then I guess I have to either create my own recipe system, downgrade to 1.11.x or recreate my workspace. Quote Link to comment Share on other sites More sharing options...
Corey Posted February 6, 2019 Share Posted February 6, 2019 Try using breakpoints to debug and step through the code in your IDE, to find out where it's failing. Quote Link to comment Share on other sites More sharing options...
Nuparu00 Posted February 6, 2019 Author Share Posted February 6, 2019 Thank you, but there is not basically any place I could do this, as all logic of the registration should be handled by vanilla automatically unless I register it manually. When I tried to do so, I called GameRegistry#addShapedRecipe() from FMLInitializationEvent and I can confirm that it was called as the debug message has been printed + if I passed some non-sense (like a recipe with more than 9 items) actually threw an exception. I think that the game is aware of the recipe, because the recipe shows in the recipe book, but for some reason the output slot is empty. Quote Link to comment Share on other sites More sharing options...
Nuparu00 Posted February 7, 2019 Author Share Posted February 7, 2019 Ok. So I have prevented all my code from executing (except the main class of course) and it works, so I have to figure out what exactly causes this. Quote Link to comment Share on other sites More sharing options...
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.