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

EntityShootBowEvent#getConsumable returns an ItemStack with "unhandled" tag

XMLWordPrintable

    • This server is running CraftBukkit version 4314-Spigot-a759b62-bbb30e7 (MC: 1.21.1) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
    • Yes

      When shooting an arrow while in creative mode, then EntityShootBowEvent object's getConsumable method returns an ItemStack with an "unhandled" tag being present. The value of that tag appears to be gzip encoded string of "minecraft:intangible_projectile".
       
      When I serialize the ItemStack returned by getConsumable, I get

      {v=3955, type=ARROW, meta=UNSPECIFIC_META:{meta-type=UNSPECIFIC, unhandled=H4sIAAAAAAAA/+NiYOBikM/NzEtNLkpMK7HKzCtJzEvPTMpJjS8oys9KTS7JzEllYAAAzByQqycAAAA=}}

      This messes up ItemStack comparison. For example, the uploaded code image always seems to print out false, when any arrow is shot in creative mode. This happens even when creating a new spigot server and pasting this code to a new spigot plugin project (+ registering the listener).

            Unassigned Unassigned
            CaptainPotatoaim Andreas Viks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: