emilyploszaj / emi

A featureful and accessible item and recipe viewer
MIT License
220 stars 46 forks source link

Fabric API custom ingredients which match the same stacks as a tag are incorrectly displayed as the tag #540

Open gliscowo opened 1 month ago

gliscowo commented 1 month ago

For a specific example, Affinity's PotionIngredient matches all three items in the c:potions tag but specifically requires the matched stack to have a certain potion in its NBT. However, since EMI only checks the stack's key and ignores NBT when searching for tag matches in EmiTag.getIngredient, it will incorrectly display this as the c:potions tag with three instances of an uncraftable potion. This is plain incorrect and can, as far as I can tell, currently not be prevented without instantiating the impl of ListEmiIngredient directly

emilyploszaj commented 1 month ago

Definitely slightly tricky to handle. Tag ingredients could have a case to coerce if all nbt for input stacks match. ListEmiIngredient is not API, so there is currently no resolution to this outside of a custom ingredient.