Placing water and setting block on fire?

Discussion in 'Plugin Development' started by Moneymaster2012, Dec 27, 2016.

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

    Moneymaster2012

    I have this:

    e.getClickedBlock().setType(Material.WATER);

    But that sets the block to water, not places water like a water bucket. Also, how can I set a block on fire?
     
  2. @Moneymaster2012
    1. Use e.getBlockFace() to get the face clicked, and then use .getRelative() on e.getClickedBlock which will give you the block you're after.
    2. Place a fire block on top of it?
     
  3. Offline

    Moneymaster2012

    Yes on top
     
  4. @Moneymaster2012
    Yeah, just get the block above it, and set its type to Material.FIRE
     
  5. Offline

    Moneymaster2012

    [​IMG]
    is the image above even semi-correct for the water?
     
  6. @Moneymaster2012
    You pass in the e.getBlockFace() as an argument to the getRelative() method.
     
  7. Offline

    Moneymaster2012

    oh lmao thank you
     
  8. Offline

    Zombie_Striker

    @Moneymaster2012
    If your problem has been solved, mark this thread as solved.
     
Thread Status:
Not open for further replies.

Share This Page