Getting exp dropped from breeding

Discussion in 'Plugin Development' started by xDeeKay, Feb 26, 2015.

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

    xDeeKay

    I'm trying to disable exp dropped from breeding, but can't seem to find any information on it.
    I've checked SpawnReason.BREEDING under the CreatureSpawnEvent, but there doesn't seem to be anything about setting exp. It also doesn't help that the bukkit docs seem to be down.

    EDIT: I need a similar thing for when Villagers drop exp after a trade.

    Any help is much appreciated!

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 13, 2016
  2. Offline

    xDeeKay

  3. Offline

    Boomer

    xp orbs arent creatureas, but they are entities
     
  4. Offline

    xDeeKay

    @Boomer Right, I just assumed since the spawn reason for breeding is fired on CreatureSpawnEvent that there would be a way to get the exp. Any idea what event I need then?
     
  5. Offline

    Boomer

    the xp is entity spawn event, but dont think it provides a way to distinguish the origin.
    You may need to act on both, save a location of the breeded entity in something, then in the entityspawned, see if its xp orbs and note the location, call a delayed task job 1 tick later or 2 ticks later.. In that task,being handed the xp location, check your breeding locations for coordinates with a distance...
     
  6. Offline

    xDeeKay

    @Boomer Yikes! Seems like a lot to do for something so simple. Thanks though, I'll look into it. Any idea on the Villagers exp?
     
Thread Status:
Not open for further replies.

Share This Page