Posted June 24, 20223 yr So I made a custom recipe type to add functionalities to the Fletching Table. Everything works, but I want to show the toast "Recipe unlocked" when the Player either meets the criteria (like for any other recipe) or craft the item at the fletching table. The idea is that in the upper-right corner it should pop-up a notification similar to the one for smithing table, but with the fletching table icon and the craft result item icon instead. I tried to use the RecipeBookCategories#create method, since it looks like every recipe category is hardcoded into that enum, however that method has an hardcoded IllegalStateException. So how can I add my own custom crafting category into the game? Don't blame me if i always ask for your help. I just want to learn to be better
June 24, 20223 yr 4 minutes ago, JimiIT92 said: RecipeBookCategories#create this is the way to go, the content of the method (the IllegalStateException) is replace at runtime by ASM, the IllegalStateException exsist if there was an issue replacing the content
June 24, 20223 yr Author Got it, during which event should I call the create method? Don't blame me if i always ask for your help. I just want to learn to be better
June 24, 20223 yr Author Ok, so I've created the Recipe Category, but in the log I have this Unknown recipe category: blazersmod:fletching/blazersmod:carbon_bow carbon bow being an Item that can be crafted using the custom recipe type. I've created it like this RecipeBookCategories.create(BlazersMod.MOD_ID + ":fletching", new ItemStack(BLItems.CARBON_BOW.get())); and the JSON file for the recipe is the following { "type": "blazersmod:fletching", "addition": { "item": "blazersmod:carbon" }, "base": { "item": "minecraft:bow" }, "result": { "item": "blazersmod:carbon_bow" } } So I don't understand why is actually trying to recognize that category instead of the "main" fletching category Don't blame me if i always ask for your help. I just want to learn to be better
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.