Cardinal Components API

Cardinal Components API

21M Downloads

CCA-Item assumes that a key will always be present when serializing certain ItemStacks

SilverAndro opened this issue ยท 2 comments

commented

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

Dynocaps and curios both use CCA-Item, dynocaps is not used in reproduction but removal results in the bug not manifesting

Reproduction

  1. Created an enchanted elytra
  2. Place a better end pedestal in the world
  3. 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
  4. 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
commented

Forgot to double check CCA verison, not present in 2.7.12

commented

Reopening, bug is reproduceable only on a dedicated server with CCA-Item 2.7.12

Reproduction steps remain the same otherwise