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

ItemStack#isSimilar returns true for skulls with different textures

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • None
    •  

       

      When calling ItemStack#isSimilar on two skull items with different textures applied it will return true. This is probably because the skull texture and owner-UUID aren't implemented in the ItemMeta yet and will probably happen for every item with no ItemMeta implementation. (Not sure which these are) It might be beneficial to find a more robust isSimilar implementation to ensure that future NBT additions don't show similar behaviour.

      Example comparision:

      ItemStack{SKULL_ITEM x 1, SKULL_META:{meta-type=SKULL, internal=H4sIAAAAAAAAAE2OzU6DQBhFP01MkPgYbkmmMIWycGGE0CFlEAoU2PEzWNqZ2lAwTJ/KR5Sli7u4OecmVwVQ4WV/njj/HL67njMFHkkLrww1pm21ltbVJtKwvUFaxVir1bg1MLZYtdF1FdRldGXD2LPbMygjm8dpYDcVAB4UeMoqPjH4ZdJHZX5Ebe7zRhJz6cke8ZCcrha5ZLL+ICYRC9++mztp/3PXY3VY88Lwj+UlmmqRoZ0Rc7aNV41IfwoRGaUToTL50qkT4SI564UgqyUy0FNJPVcGB1enp6yndypCJ124OwdezKnjC5o0RnEvcOgFc5i4uOx9u8vR2/Ie/gB7xc86GAEAAA==}} equals ItemStack{SKULL_ITEM x 1, SKULL_META:{meta-type=SKULL, internal=H4sIAAAAAAAAAE2PzU6DQBRGryYmSHwMtyRTYDBddGGkoUPKIC3QMjt+LqEwYENBoc/lA8rS5ZdzzuJTAVR4OTajlJ/9V3mRqMAjK+CV5gZmpo4aNVNTMw3MtZTSQistE3WdoEFpqoK6RFfshwvenkEZcBrGHm8qADwo8BSnckT4xdkl4lyR4uzKfGbWssMjkT6rr2+si+fsg1msXfju3drP638uHdITlYnhVqILxqyNyd44SNwdVnkbfYtaVr6dGF4d6V6YzMKJJXd45YfNxO854Y5o/ZCZvu3WSbidfSeivGaUt8lPctoSz44m0bqV5wSE1/ldhLJh3WpdBpvN8gD+ADoLhdUcAQAA}}: true

            Unassigned Unassigned
            Phoenix616 Phoenix616
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: