mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
fixed possible crash
This commit is contained in:
parent
38de7f2042
commit
e678d16118
1 changed files with 2 additions and 2 deletions
|
|
@ -756,8 +756,8 @@ class Entity extends Position
|
|||
|
||||
public function positionRider($dead){
|
||||
if($this->rider != 0){
|
||||
$e = $this->level->entityList[$this->rider];
|
||||
if($e === false) return;
|
||||
$e = $this->level->entityList[$this->rider] ?? false;
|
||||
if(!($e instanceof Entity)) return;
|
||||
|
||||
$v3 = $this->getRideHeight();
|
||||
if($dead || $this->dead) $v3 = 0.01;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue