Jump to content

[1.12] JSON recipe input nbt insensitive


thommy101

Recommended Posts

Opening a topic here before reporting it to Github as I'm not 100% sure it's a bug. Posting to get some more input.

 

I've got an issue with setting up an JSON crafting recipe with items with specific nbt tags. Setting the output works perfect. The input is read correctly as it's displaying correctly through JEI.

I'm setting up one with input of type "minecraft:item_nbt" and the code path for loading it is as follows:

 

(Based on Forge build #2359)

On ShapedOreRecipe#210 it loads every crafting ingredient with CraftingHelper.getIngredient(...)

CraftingHelper.getIngredient(...) tries to load it with a factory defined at CraftingHelper#530 which correctly creates an ItemStack with NBT data defined.

CraftingHelpers method getIngredient returns an Ingredient, which apply method is used to verify if a stack matches the given item.

 

The problem I think there is, is that that method is NBT insensitive, it only checks the item and metadata even if the ItemStack has NBT data defined.

 

This could be solved by defining my own Ingredient, but I think there's a usecase within Forge for this too as many mods may use it.

 

Am I right this is issue worthy or should I just make my own Ingredient which overrides the default apply and make a NBT sensitive version of it?

Link to comment
Share on other sites

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.