Falling Blocks

Discussion in 'Plugin Development' started by Starfire1337, Oct 19, 2014.

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

    Starfire1337

    I am currently working with falling blocks, the code I am using is:
    Code:java
    1. sLoc.getWorld().spawnFallingBlock(sLoc, Material.PISTON_MOVING_PIECE, (byte)1);

    Since this breaks when it hits the ground, I was listening to EntityChangeBlockEvent to set that block. However, this event is for some reason not firing when the block hits the ground. Is there any event I should listen to instead?
     
  2. Offline

    TheCodingCat

    I'm not too sure Starfire1337 but I think listening to EntityMoveEvent then checking if the block is near (or at) ground, then place the block of your likings
     
  3. Offline

    Starfire1337

  4. Offline

    TheCodingCat

    Whahat :O Oh **** I'm getting confused with PlayerMoveEvent xD sorry Starfire1337 I'll think of something else as soon as I get on my PC
     
  5. Offline

    TheCwispyOne

    Starfire1337 I know there is a BlockPhysicsEvent. You could try that :p I'm not sure if it will work though.
     
  6. Offline

    Konato_K

Thread Status:
Not open for further replies.

Share This Page