EmiStackSerializer does not serialize NBT for stacks with amount != 1
krossgg opened this issue ยท 1 comments
Issue is for Minecraft 1.20.1, but may also be valid for 1.21
When adding a recipe or stack that has an amount that is not 1
to your favorites, the NBT for that stack is not serialized.
The actual EmiStack
that is passed to the EmiFavorites#addFavorite
method does contain this NBT, however it is lost once the stack is normalized via serialization/deserialization.
This is particularly evident when adding a FluidStack with NBT, however it also occurs with ItemStacks that have an amount greater than 1.
Example with FluidStacks:
This recipe has an output of 750mB of a FluidStack with NBT.
When saving it, the stack in my favorite list has lost all NBT. However, it still retains memory of its recipe.
This also occurs when attempting to favorite one of these NBT FluidStacks from a UI or EMI Index (as they have 0 amount in the index)
Example with ItemStacks:
I have two items with the same name, which is stored as NBT. The Item type and the NBT are the same, so the items are allowed to stack.
When pressing 'A' on a stack with just one, the favorited stack has the set name. When doing it with a stack of two, however, the name is lost.
Inventory | Favorites List |
---|---|
Interestingly enough, the Lookup History list will retain the stack NBT.
However, due to saving and loading, the stack will lose the NBT when the world is left and re-entered.