Solved item touch ground event

Discussion in 'Plugin Development' started by victor2748, Oct 6, 2014.

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

    victor2748

    Hello all, I have this problem: I am trying to make it so when an item entity falls on ground, it removes the item, and makes some effects there, etc. But I researched for a way to do so, and haven't found it yet (neither entity collision or entity drop events are existing). Is there a way to track down the event, so when an entity (or item entity) touches a block (or falls on ground) it will execute the code?

    Thanks, Victor.
     
  2. Offline

    RingOfStorms

    "neither entity collision or entity drop events are existing"

    Did you take a look at the javadocs?

    There are two very clear events for the spawning/dropping of entities.
     
  3. Offline

    Skionz

    victor2748 Create a scheduler and constantly check the items location until the block underneath it != air
     
    victor2748 likes this.
  4. Offline

    teej107

    victor2748 likes this.
  5. Offline

    victor2748

    Skionz teej107
    Thanks!

    RingOfStorms
    Yes, I read the JavaDocs VERY CLEARLY before asking this question. And incase you misunderstood my question:
    So, I don't need any of the 2 events, I was asking is there an event that fires when an item entity DROPS ON GROUND, not what PLAYER DROPS it out of the inventory.

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

    RingOfStorms

    You're going to need to use one of those events to achieve what you want. There is no hit ground event so you'll have to track the item after it spawns and check periodically if it hits the ground.
     
Thread Status:
Not open for further replies.

Share This Page