mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
fixed closestPlayerEID being not in entityList
This commit is contained in:
parent
0022bfb321
commit
236f641d6c
6 changed files with 12 additions and 6 deletions
|
|
@ -16,6 +16,11 @@ abstract class Creature extends Living{
|
|||
$this->searchForClosestPlayers = true;
|
||||
}
|
||||
|
||||
public function update($now){
|
||||
$this->handlePrePlayerSearcher();
|
||||
return parent::update($now);
|
||||
}
|
||||
|
||||
public function handlePrePlayerSearcher(){
|
||||
parent::handlePrePlayerSearcher();
|
||||
if($this->closestPlayerEID !== false && !isset($this->level->entityList[$this->closestPlayerEID])){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue