JimiIT92 Posted June 24, 2022 Share Posted June 24, 2022 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? Quote Don't blame me if i always ask for your help. I just want to learn to be better Link to comment Share on other sites More sharing options...
Luis_ST Posted June 24, 2022 Share Posted June 24, 2022 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 Quote Link to comment Share on other sites More sharing options...
JimiIT92 Posted June 24, 2022 Author Share Posted June 24, 2022 Got it, during which event should I call the create method? Quote Don't blame me if i always ask for your help. I just want to learn to be better Link to comment Share on other sites More sharing options...
JimiIT92 Posted June 24, 2022 Author Share Posted June 24, 2022 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 Quote Don't blame me if i always ask for your help. I just want to learn to be better 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.