From f63e859b3acd970b2f8cdbd6ffe7e40b7028d86c Mon Sep 17 00:00:00 2001 From: Falkirks Date: Tue, 27 Jan 2015 17:09:31 -0800 Subject: [PATCH] Falling sand will become block when in contact with a Liquid This replicates the behaviour of MCPE. --- src/pocketmine/entity/FallingSand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/entity/FallingSand.php b/src/pocketmine/entity/FallingSand.php index 8ee4e50fc..51b91a169 100644 --- a/src/pocketmine/entity/FallingSand.php +++ b/src/pocketmine/entity/FallingSand.php @@ -23,6 +23,8 @@ namespace pocketmine\entity; use pocketmine\block\Block; +use pocketmine\block\Flowable; +use pocketmine\block\Liquid; use pocketmine\event\entity\EntityBlockChangeEvent; use pocketmine\event\entity\EntityDamageEvent; use pocketmine\event\entity\EntityRegainHealthEvent; @@ -111,7 +113,7 @@ class FallingSand extends Entity{ if($this->onGround){ $this->kill(); $block = $this->level->getBlock($pos); - if($block->getId() > 0 and !$block->isSolid()){ + if($block->getId() > 0 and !$block->isSolid() and !($block instanceof Liquid)){ $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())));