Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5822

ItemStacks serialized with attributes prior to 1.16 lose their attributes in 1.16.1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • Mac OS

    • git-Spigot-758abbe-3f0c333 (MC: 1.16.1)
    • Yes

    Description

      This looks like a similar problem to SPIGOT-4576

      Serialized ItemStacks with attributes lose their attributes in 1.16. Internal MC code prints an error "Unable to create attribute: null", meaning an NPE was thrown inside of nms.AttributeModifier.a(NBTTagCompound).

      My best guess is that it's missing the minecraft: prefix on the Mojang attribute type, judging by the before and after shown in the attached screenshots (these attributes were created separately on each version, not deserialized, to see what they should look like)

      Here is an example of an item serialized in older versions of Spigot that now throws this error:

      item:
        ==: org.bukkit.inventory.ItemStack
        type: GOLD_SWORD
        damage: 7
        meta:
          ==: ItemMeta
          meta-type: UNSPECIFIC
          display-name: Emerald Sword
          Unbreakable: true
          internal: H4sIAAAAAAAAAONiYOBkEHIsKSnKTCotSfXNT8lMy0wtKuZiYGBgYmHgCA31dPHNLy75pWwn49jgkcrCwAkS8klNLC7ZIL3n3PTWNYvZGNgcc/NL80ocGCCAg4ElOCe/hIEjNzEzLyMxL4WDgRduhV9ibiqDcHpqXmpRZrJeYklJYnJ2cEFqagozA6d/QWpRYklmfh7UFLBaIdfC0syC3NS8EgWY8xiQXHbaPvRySoy/BbLLlkyfI7zYdut5hMsUiHWZCKrLXBJzE9NTSXEaAwCwmFFiUwEAAA==
      
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            NathanWolf Nathan Wolf
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: