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

EntityChangeBlockEvent is not getting called for villager emptying composter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • 1.16.1-R0.1-SNAPSHOT
    • Yes

      Spigot only calls the event if the old stage is below 7, which means the event isn't getting called when villagers empty the composter. My assumption is, that when villagers call the function 

      a(IBlockData iblockdata, WorldServer worldserver, ItemStack itemstack, BlockPosition blockposition, EntityVillager entity)
      

      and it returns the old state, they maybe call another function? 

      Edit: i did some more digging, the villager emptying the composter happens in

      BehaviourWorkComposter
      

      in the function

      a(WorldServer worldserver, EntityVillager entityvillager, GlobalPos globalpos, IBlockData iblockdata)
      

      the first if statement tests if the composter is full when the villager want to "work" with the composter and empties it in that case. 

      Would be great if someone could add an event call in there

            Unassigned Unassigned
            some3uddy no thanks
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: