Solved Bee events ?

Discussion in 'Spigot Plugin Development' started by Aurelien30000, Jan 19, 2020.

  1. Hey community, would you know if there is a way to detect when a bee gets nectar and enters a hive (via an event), because I haven't found anything so far :x Thank you in advance! :)
     
  2. I'm not able to find any event suitable for what you asking :confused:

    What you can try:
    • The EntityInteractEvent could be triggered when a bee does something
      • Just create a Event an broadcast every time this event is called (the simple debug way)
      • then ingame watch a bee enter a hive and loook if there was an event triggered
    • Tell a bit more about what you are planning to do. Maybe there is a another way to get the same result
    ~G
     
    • Like Like x 1
  3. Thanks however for your answer !

    Nothing with this event sadly :/

    As for what I would like:
    - When a bee tries to get into a hive, I wish get it as a Java object, because I'm working on a mob stacking system and I would like to be able to separate them once she got in.

    Example:

    - I have a stack of 10 bees
    - A bee is ready to enter in a hive
    - The bee enters
    - Plugin detects the event and modify the entered bee (name, data for stacking, etc)
    - Plugin also spawns a stack with this time 9 bees
     
  4. You could keep track of all the behives (or just selected ones), and check for changes in the number of bees inside of it using a repeating task. (AFAIK the number of bees is stored in the NBT data)
    However you won't be able to get the bee object using this way, only detect when a bee enters/leaves a hive
     
    • Like Like x 1
  5. Your solutions are interesting, and I thank you for yours answers, but it's really complicated and sometimes a ressource consumer operation :/
    So, I just make a suggestion of new events for that, after analysing the code it's in a normal way possible ! :)

    If you want to track it, here is the link : https://hub.spigotmc.org/jira/browse/SPIGOT-5526