Jump to content

Recommended Posts

Posted

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)});
	}

 

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.