mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +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){
|
public function positionRider($dead){
|
||||||
if($this->rider != 0){
|
if($this->rider != 0){
|
||||||
$e = $this->level->entityList[$this->rider];
|
$e = $this->level->entityList[$this->rider] ?? false;
|
||||||
if($e === false) return;
|
if(!($e instanceof Entity)) return;
|
||||||
|
|
||||||
$v3 = $this->getRideHeight();
|
$v3 = $this->getRideHeight();
|
||||||
if($dead || $this->dead) $v3 = 0.01;
|
if($dead || $this->dead) $v3 = 0.01;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue