Posted December 31, 20177 yr Hello I am trying to make a crafting recipe for my armor but it simplay doesn't work in game. I use this method to register the recipes: public static void registerArmor() { GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_helmet"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_helmet), new Object[] {"RRR", "R R", " ", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_helmet"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_helmet), new Object[] {" ", "RRR", "R R", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_chestplate"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_chestplate), new Object[] {"R R", "RRR", "RRR", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_leggings"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_leggings), new Object[] {"RRR", "R R", "R R", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_boots"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_boots), new Object[] {" RR", "R R", " ", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_boots"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_boots), new Object[] {" ", "R R", "R R", 'R', ModItems.ruby}); } And call this method in my MainClass: ModCrafting.registerArmor(); Same thing i do with other recipes and they work so i don't know where is the problem. Theese are my other recipes: public static void register() { GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:rubyblock"), new ResourceLocation("ModBlocks"), new ItemStack(ModBlocks.rubyblock), new Object[] {"RRR", "RRR", "RRR", 'R', ModItems.ruby}); GameRegistry.addShapelessRecipe(new ResourceLocation("dimensions:ruby"), new ResourceLocation("ModItems"), new ItemStack(ModItems.ruby, 9), new Ingredient[] {Ingredient.fromItem(Item.getItemFromBlock(ModBlocks.rubyore))}); GameRegistry.addSmelting(new ItemStack(ModBlocks.rubyblock), new ItemStack(ModItems.ruby), 0.5F); } And I also register them in Main Class: ModCrafting.register(); I also tried to put all recipes into one method but no result. Please help.
December 31, 20177 yr 1 hour ago, CrashCZ said: Hello I am trying to make a crafting recipe for my armor but it simplay doesn't work in game. I use this method to register the recipes: public static void registerArmor() { GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_helmet"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_helmet), new Object[] {"RRR", "R R", " ", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_helmet"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_helmet), new Object[] {" ", "RRR", "R R", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_chestplate"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_chestplate), new Object[] {"R R", "RRR", "RRR", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_leggings"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_leggings), new Object[] {"RRR", "R R", "R R", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_boots"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_boots), new Object[] {" RR", "R R", " ", 'R', ModItems.ruby}); GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:ruby_boots"), new ResourceLocation("ModArmor"), new ItemStack(ModArmor.ruby_boots), new Object[] {" ", "R R", "R R", 'R', ModItems.ruby}); } And call this method in my MainClass: ModCrafting.registerArmor(); Same thing i do with other recipes and they work so i don't know where is the problem. Theese are my other recipes: public static void register() { GameRegistry.addShapedRecipe(new ResourceLocation("dimensions:rubyblock"), new ResourceLocation("ModBlocks"), new ItemStack(ModBlocks.rubyblock), new Object[] {"RRR", "RRR", "RRR", 'R', ModItems.ruby}); GameRegistry.addShapelessRecipe(new ResourceLocation("dimensions:ruby"), new ResourceLocation("ModItems"), new ItemStack(ModItems.ruby, 9), new Ingredient[] {Ingredient.fromItem(Item.getItemFromBlock(ModBlocks.rubyore))}); GameRegistry.addSmelting(new ItemStack(ModBlocks.rubyblock), new ItemStack(ModItems.ruby), 0.5F); } And I also register them in Main Class: ModCrafting.register(); I also tried to put all recipes into one method but no result. Please help. What version are you using?
December 31, 20177 yr Author 3 hours ago, Differentiation said: What version are you using? 1.12.2 I also tried the json way with same result
December 31, 20177 yr Author I solved it. I had to put the register method into a ModArmor class and call it in Main Class.
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.