[Does it exist?] - Bonemeal Event

Discussion in 'Plugin Development' started by Shay Williams, Jul 30, 2011.

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

    Shay Williams

    Hey guys, I'm wondering if there's any kind of API I can call that simulates right clicking a spot with bonemeal.

  2. Offline


    Haha, I don't think so, but you could probably replicate the event with little problem by checking if the area around the clicked block is grass, then converting the air block above it to a tall grass block.

    You'd have to come up with some randomization algorithm to make it look like the grass was haphazardly placed.

    What do you need this for? It might help us come up with work-arounds...
  3. Offline


    I think the best way to detect this would be to do the following:
    2. public void onPlayerIntereact(PlayerInteractEvent event){
    3. if(event.getAction() != Action.RIGHT_CLICK_BLOCK)
    4. return;
    5. //check to see if item in hand is bonemeal
    6. //proceed if true

    I don't feel like looking up the data for bonemeal, or how to detect it...but you get the idea :p
Thread Status:
Not open for further replies.

Share This Page