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

Endereye consumption triggers are broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • 3661
    • Not Applicable
    • Yes

      Here is the situation:
      Im trying to check when a player right clicks an Ender_Eye (and check if it has my custom data and all that)

      And let me preface that I'm not a new developer or anything, I just want to ensure nothing has changed from 1.19.2-1.19.3 that I'm not heretical about.

      • I can trigger my event to see whats in my hands (interact event, left click) and i get the following:
        PlayerInteractEventItemStack{AIR x 0} ItemStack{ENDER_EYE x 1}

         (offhand, main hand) which is correct, the main hand contains an endereye

       

      • i can trigger the same with a different consumable like an enderpearl and get the following:
        PlayerInteractEventItemStack{AIR x 0} ItemStack{ENDER_PEARL x 1} 

        (also correct)

       

      Here is where the issue is:
      I spend the ender pearl (right click / trigger its throw)
      Ender pearl: 

      PlayerInteractEventItemStack{AIR x 0} ItemStack{ENDER_PEARL x 1} 

      (this reflects the pearl)

      Endereye:  

      PlayerInteractEventItemStack{AIR x 0} ItemStack{AIR x 0}

      (this SHOULD) reflect the ender eye, but it does not.

       

      This is my check as a snippet: so you can see what im replicating:

      @EventHandler
          public void on(PlayerInteractEvent e) {
              Plugin.info("PlayerInteractEvent" + e.getPlayer().getInventory().getItemInOffHand() + " " + e.getPlayer().getInventory().getItemInMainHand());
      ...

      and here is a gif of the situation:
      as you can see the interaction reflects the pearls correctly, but does not reflect the eyes correctly.
      https://gfycat.com/UnluckyPositiveCobra (you can see it in hd if you click the little hd button)

       

      Now, i already looked around but i could have totally missed the change if you changed where this event trigger for endereyes is, but i dont think thats the prpblem, nor do I think you would change that.

            Unassigned Unassigned
            NextdoorPsycho Brian Fopiano
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: