Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

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?

  • Author
3 hours ago, Differentiation said:

What version are you using?

1.12.2 I also tried the json way with same result

  • 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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.