From 6156baab85aeee88c3ab260b288bdb7d9de3a469 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sun, 3 Feb 2013 11:03:54 +0100 Subject: [PATCH] Added Liquid check to Fall Damage --- src/classes/world/Entity.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/classes/world/Entity.php b/src/classes/world/Entity.php index 265577b8..1239f37c 100644 --- a/src/classes/world/Entity.php +++ b/src/classes/world/Entity.php @@ -277,8 +277,10 @@ class Entity extends stdClass{ } }elseif($this->fallY !== false){ //Fall damage! if($y < $this->fallY){ + $d = $this->server->api->level->getBlock($x, $y + 1, $z); + $d = BlockAPI::get($d[0]); $dmg = ($this->fallY - $y) - 3; - if($dmg > 0){ + if($dmg > 0 and !($d instanceof LiquidBlock)){ $this->harm($dmg, "fall"); } }