CCA-Item assumes that a key will always be present when serializing certain ItemStacks
SilverAndro opened this issue ยท 2 comments
This line in MixinItemStack.serialize seems to assume that AbstractComponentContainer.NBT_KEY
will always be present if this.serializedComponents != null
is true and this.components != null
is false
However, for unknown reasons it is possible to construct a situation where this is not true given a collection of certain mods
Mods used
- Fabric api 0.31.0
- Better end (dev version, this commit specifically at time of writing due to mixin issues otherwise)
- Curios api (fabric) 0.0.11
- Curious elytra 1.1.1
- Dynocaps 1.6.13
Dynocaps and curios both use CCA-Item, dynocaps is not used in reproduction but removal results in the bug not manifesting
Reproduction
- Created an enchanted elytra
- Place a better end pedestal in the world
- Place elytra on pedestal -> Bug manifests here, when the elytra is placed
AbstractComponentContainer.NBT_KEY
is not present, resulting in null being passed as a tag - Force chunks to save -> Error manifests here when null is attempted to be serialized as a tag, leading to chunk reset and disconnection if in multiplayer with no modded blame in the stack trace