CustomIngredient broken equality
MehVahdJukaar opened this issue ยท 4 comments
CustomIngredient instances (the vanilla Ingredient wrapped ones) dont have a custom equality implementation. This can cause all sorts of issues as a custom igredient will be considered equal to an empty one
Whats the use case for checking their equality? I assume this isnt a new issue to 1.21.4?
use case can be anything. like putting ingredients in any data structure will break when mods throw it custom ones. Neoforge which has an awfully similar custom ingredient implementatio does have an equality check for it. This was tested in 1.21.1
Aren't custom ingredients part of the ingredient codec? Optional field codecs with default values use equality checks to determine whether the value is serialized.