Blocks to FallingSand

Discussion in 'Plugin Development' started by Cookies160, May 3, 2014.

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

    Cookies160

    I plan on making an earthquake plugin, but have no idea how to go about doing it. More specifically, I can't think of a simple way to transform blocks into FallingSand with the same TileID. Any help or idea are appreciated!

    -Cookies160
     
  2. Offline

    NDUGAR


    I'd go about it like Sethbling's tree plugin because it uses falling tiles, although this is very much so different; sorry I cannot be more help.
     
  3. Offline

    Cookies160

    I will look into it, thanks!
     
  4. Offline

    Zach_1919

    Cookies160 Make a method called blockToFallingSand(BlockState b) or something. Create a new falling sand entity then use b.getType() and whatnot to supply the falling sand with the proper information. Use this method for whatever block you need to turn into falling sand.
     
  5. Offline

    akabarblake

    I would use this way, in pseudo code; due because never tested it.
    Get loc of block
    Set fallingsand
    Velocity
    (Ride player on it, Wee!)
     
  6. Offline

    Drkmaster83

    There's a FallingEntity or FallingBlock class that you can set the data of, I believe. You'd just have to do calculations for the velocity, get the block that you're gonna spawn, where you're going to spawn it, and set the place at where it's replacing the old sand block to 0 (AIR).
     
Thread Status:
Not open for further replies.

Share This Page