mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39: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
|
|
@ -414,10 +414,10 @@ class Entity extends Position
|
|||
}
|
||||
}
|
||||
|
||||
if($this->class !== ENTITY_PLAYER and ($this->x <= 0 or $this->z <= 0 or $this->x >= 256 or $this->z >= 256 or $this->y >= 128 or $this->y <= 0)){
|
||||
$this->close();
|
||||
return false;
|
||||
}
|
||||
//if($this->class !== ENTITY_PLAYER and ($this->x <= 0 or $this->z <= 0 or $this->x >= 256 or $this->z >= 256 or $this->y >= 128 or $this->y <= 0)){
|
||||
// $this->close();
|
||||
// return false;
|
||||
//}
|
||||
|
||||
if($this->dead === true){
|
||||
$this->fire = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue