Jump to content

1.14.4 - How to make a crafting recipe to NOT mirror?


Recommended Posts

Posted (edited)

Recipes are automatically mirrored left-right. I don't want this for my recipes. Is there any way to do it?

Edited by Kikoz
Posted
21 minutes ago, Kikoz said:

Recipes are automatically also valid when mirrored left-right. I don't want this for my recipes. Is there any way to do it?

Umm, how does your recipe look like? Is there a reason it needs to be mirror selective? In real life most things doesn't care whenever its mirrored or not, only the weak force care as far as we've discovered.

Posted

Hi

Based on the code in ShapedRecipe.matches(), which hard-codes checking for the mirrored version, I think the only way is probably to register your own recipe handler which is more or less an exact copy of ShapedRecipe but omits the mirror check.  There appears to be a registry of IRecipeSerializer which looks promising i.e. you create your new NonMirroredSerializer and register it in the appropriate event, probably something like

 

@SubscribeEvent public static void onItemsRegistration(final RegistryEvent.Register<Item> itemRegisterEvent) {

  @SubscribeEvent
  public static void onRecipeRegistration(final RegistryEvent.Register<IRecipeSerializer<?>> recipeRegisterEvent) {
		recipeRegisterEvent.getRegistry().register(mySerializer);
}

 

That's just a pure guess on my part, haven't tried it out, but I think it's worth a try

 

-TGG

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.