From 5c8297f4a16e0c25a5d12ec8e76e451dc4673875 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 23 May 2017 19:48:49 +0100 Subject: [PATCH] Fixed some logic issues with falling blocks, fix #897 #899 #935 --- src/pocketmine/entity/FallingSand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/entity/FallingSand.php b/src/pocketmine/entity/FallingSand.php index 945892eb43..2ff81d4e77 100644 --- a/src/pocketmine/entity/FallingSand.php +++ b/src/pocketmine/entity/FallingSand.php @@ -121,7 +121,8 @@ class FallingSand extends Entity{ if($this->onGround){ $this->kill(); $block = $this->level->getBlock($pos); - if($block->getId() > 0 and !$block->isSolid() and !($block instanceof Liquid)){ + if($block->getId() > 0 and $block->isTransparent() and !$block->canBeReplaced()){ + //FIXME: falling blocks are supposed to be destroyed by glass blocks, and anvils are supposed to destroy torches $this->getLevel()->dropItem($this, ItemItem::get($this->getBlock(), $this->getDamage(), 1)); }else{ $this->server->getPluginManager()->callEvent($ev = new EntityBlockChangeEvent($this, $block, Block::get($this->getBlock(), $this->getDamage())));