mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
reworked mob spawn, added mob despawn if far away, mobs will not die if their pos is >255 or <0, getBlockID/getBlock return INVISIBLE_BEDROCK if pos >255 or <0 (xz)
This commit is contained in:
parent
271f82f5ed
commit
9ee4b08657
6 changed files with 98 additions and 25 deletions
|
|
@ -90,7 +90,12 @@ abstract class Living extends Entity implements Pathfindable{
|
|||
return;
|
||||
}
|
||||
if($this->closed) return;
|
||||
|
||||
|
||||
$check = $this->level->mobSpawner->checkDespawn($this);
|
||||
if($check){
|
||||
$this->close();
|
||||
return;
|
||||
}
|
||||
parent::update($now);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue