Posted February 5, 20214 yr I have a class that extends IRecipe, with it's own serializer and builder. I'm registering the Serializer with a deferredRegister, and I'm registering the recipe type by calling IRecipeType.register in the registry event for the recipe serializers. I'm generating a file using the recipe builder, it works fine. but whenever I try to load a world it gives the following error: https://gist.github.com/jvcmarcenes/0ef3c7b8eeabf94efce04fd40215cafa this is the recipe file (generated [main]/resources/data/minecraft/recipes/diamond_mod_recipe.json): { "type": "tca:mod_shaped", "energy_cost": 100, "pattern": [ "ddd", "dgd", "ddd" ], "key": { "d": { "item": "minecraft:dirt" }, "g": { "item": "minecraft:gold_block" } }, "result": { "item": "minecraft:diamond" } } and this is the generated file fot the criterion (generated [main]/resources/data/minecraft/advancements/recipes/misc/diamond_mod_recipe.json): { "parent": "minecraft:recipes/root", "rewards": { "recipes": [ "minecraft:diamond_mod_recipe" ] }, "criteria": { "has_item": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "item": "minecraft:gold_block" } ] } }, "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { "recipe": "minecraft:diamond_mod_recipe" } } }, "requirements": [ [ "has_item", "has_the_recipe" ] ] } Edited February 5, 20214 yr by kiou.23
February 5, 20214 yr Author 1 hour ago, diesieben07 said: Your Mod ID is too short and not unique. Yeah, I've been told, I'l change it later 1 hour ago, diesieben07 said: This error happens if your IRecipe returns null in getType. I added the IRecipe before the RecipeType, so I made it return null and forgot about it...
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.