mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Added Liquid check to Fall Damage
This commit is contained in:
parent
bf63065d4e
commit
6156baab85
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue