Extend Life of Falling Blocks

Discussion in 'Spigot Plugin Development' started by Wowserman, Jun 10, 2016.

  1. Hi!

    While working with falling sand, I noticed falling sand despawns when its stationary after a couple of seconds (10-15).

    All I had was falling sand, riding a armorstand to make it stationary. After a couple moments the sand would disappear.

    Any way to prevent this?
  2. You can crank up the lifetime of a FallingBlock, however this will only delay your problem, not solve it.
    So you have to listen to some kind of EntityRemoveEvent and cancel that / respawn the sand
  3. Have you tried just putting a regular block of sand of the ArmorStand's head to give the illusion of falling sand?
  4. Would Falling Sand despawning count as a Entity Death?
  5. Under Entity Death Event?
  6. I've tried using this, but when the block is on the ArmorStand's head, it shrinks about 10% in size, so it is now the size of an actual block.
  7. Yep
  8. and btw I'm testing it out
  9. and it doesn't work, i cannot detect fallingsand despawning using the EntityDeathEvent
  10. Have you considered removing the falling sand once it lands and setting the sand as a natural block on the floor and using a runnable to remove it?