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

ItemStacks not comparing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • CraftBukkit version 3355-Spigot-dbf4938-3c2af1b (MC: 1.18) (Implementing API version 1.18-R0.1-SNAPSHOT)
    • Yes

      If you have a itemstack saved in a config deserialized in 1.17 then update to 1.18 a value named "v" changes to "2860" whilst still being "2730" in the config will cause them to not equal eachother even though they are the same exact item.

       

      Config for example

        itemstack:
          v: 2730 (1.18 itemstack are 2860)
          type: DIAMOND_SWORD
          meta:
            ==: ItemMeta
            meta-type: UNSPECIFIC
            Damage: 2 
      player.getInventory().containsAtLeast(configitem, 1) //Will return false if one is a ItemStack from 1.17

            Unassigned Unassigned
            16austin16 Austin Thiel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: