You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the ingredient type is now neoforged:nbt, I would expect this to error. However, this actually results in a successful deserialization with an ingredient containing just the minecraft:potion item.
The text was updated successfully, but these errors were encountered:
Didn't we discuss this issue on Discord before? The solution recommend was instead of using an either codec, to just have the type field default to the ID of the vanilla serializer in the forge registry.
If somebody knows a better codec setup to do this, I would be open to figure this out.
My thought would be a custom MapCodec based on KeyDispatchCodec which replaces the typeKey/keyCodec fields with a MapCodec which is built with optionalFieldOf
I was porting something containing the following Ingredient:
Since the ingredient type is now
neoforged:nbt
, I would expect this to error. However, this actually results in a successful deserialization with an ingredient containing just theminecraft:potion
item.The text was updated successfully, but these errors were encountered: