Solved Detect Villager interaction between them

Discussion in 'Plugin Development' started by Oxooi, Jun 22, 2021.

Thread Status:
Not open for further replies.
  1. Offline

    Oxooi

    Hi !
    I am looking for a specific event related to the Villagers :
    Example :
    Code:
    @EventHandler
        public void
    onVillagerInterract(PlayerInteractAtEntityEvent e) 
    When the villagers look at each other and / or exchange items (Farmer who drops hay)

    It's very precise and I don't think it's really listenable
    but I try anyway :)
     

    Attached Files:

  2. Offline

    davidclue

    @Oxooi I don't believe there is an event for this but you could create a custom event for this. Just check every villager if they are facing another villager that is 1 block in front of them, then fire your custom event.
     
    Oxooi likes this.
  3. Offline

    Oxooi

    Ho ok ! thank you I didn't think about it
     
Thread Status:
Not open for further replies.

Share This Page