mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Added Liquid check to Fall Damage
This commit is contained in:
parent
bf63065d4e
commit
6156baab85
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user