diff --git a/src/pocketmine/block/Lava.php b/src/pocketmine/block/Lava.php index 401e4a3ef2..21373876c7 100644 --- a/src/pocketmine/block/Lava.php +++ b/src/pocketmine/block/Lava.php @@ -21,6 +21,7 @@ namespace pocketmine\block; +use pocketmine\entity\Effect; use pocketmine\entity\Entity; use pocketmine\event\entity\EntityCombustByBlockEvent; use pocketmine\event\entity\EntityDamageByBlockEvent; @@ -64,9 +65,7 @@ class Lava extends Liquid{ $entity->setOnFire($ev->getDuration()); } - if($entity instanceof Player){ - $entity->onGround = true; - } + $entity->resetFallDistance(); } public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){ diff --git a/src/pocketmine/block/Water.php b/src/pocketmine/block/Water.php index de8d3db0a9..6aaad16ce0 100644 --- a/src/pocketmine/block/Water.php +++ b/src/pocketmine/block/Water.php @@ -47,9 +47,7 @@ class Water extends Liquid{ $entity->extinguish(); } - if($entity instanceof Player){ - $entity->onGround = true; - } + $entity->resetFallDistance(); } public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){