Posted March 4, 20187 yr I know everyone is telling to use the new json recipes, but i don't like it actually. It is frustrating to create all those files 1 by 1 ..... Instead i would like to do it in code, for now. I might eventually switch. I wonder if this is the right way to register recipes now in code: @SubscribeEvent public static void registerRecipes(RegistryEvent.Register<IRecipe> event) { //adding recipe for clay bucket GameRegistry.addShapedRecipe(new ResourceLocation(Reference.MODID + ":" + "clay_bucket"), new ResourceLocation(Reference.MODID + ":" + "buckets"), new ItemStack(ItemInit.CLAY_BUCKET), new Object[] {"B B","B B", "BBB", 'B', new ItemStack(Items.CLAY_BALL)}); } Try out my new Modpack for MC 1.15.2 https://www.curseforge.com/minecraft/modpacks/terran-civilization
March 4, 20187 yr Author 1 minute ago, diesieben07 said: No. Use JSON files. You can generate them automatically if you want. Do not register recipes in code. Automatically? Sounds good. Where and how? Also why not in code? I mean not that i disagree, just want to know why? Try out my new Modpack for MC 1.15.2 https://www.curseforge.com/minecraft/modpacks/terran-civilization
March 4, 20187 yr Author Ok but what about oredictionary? If i was going to add more wood types, for example "apple_planks". How would i register it as "planks"? Does this still has to be done in code? Try out my new Modpack for MC 1.15.2 https://www.curseforge.com/minecraft/modpacks/terran-civilization
March 5, 20187 yr Author Aha, so is that what the "group" is meant for? : { "type": "crafting_shaped", "group": "boat", "pattern": [ "# #", "###" ], "key": { "#": { "item": "minecraft:planks", "data": 4 } }, "result": { "item": "minecraft:acacia_boat" } } Try out my new Modpack for MC 1.15.2 https://www.curseforge.com/minecraft/modpacks/terran-civilization
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.