Alternative method for World#spawnFallingBlock?

Discussion in 'Spigot Plugin Development' started by pauhull, Jul 14, 2018.

  1. Since org.bukkit.World#spawnFallingBlock is deprecated, which is the new preffered way of spawning a falling block? (+Data)
  2. I saw that too, but could never find an alternative for it. I believe FallingBlock belongs to an entity now like Armor Stands, so you could try to spawn an entity from the FallingBlock.class.
  3. I tried that, but it didn't let me set the block type. I guess I have to use the deprecated method then..
  4. As of 1.13: World#spawnFallingBlock(Location, BlockData)

    There's also a method using the MaterialData class which is not deprecated as far as I know, but this class is deprecated in 1.13. Thus, using the MaterialData method is hardly any better than using World#spawnFallingBlock(Location, Material, byte).