Jump to content

Recommended Posts

Posted

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.

Posted
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?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.