mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
made entities spawnable in 256+/negative chunks
This commit is contained in:
parent
8248088c29
commit
1a9ce30f1a
1 changed files with 4 additions and 4 deletions
|
|
@ -381,7 +381,7 @@ 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)){
|
||||
if($this->class !== ENTITY_PLAYER and ($this->y >= 128 or $this->y <= 0)){
|
||||
$this->close();
|
||||
return false;
|
||||
}
|
||||
|
|
@ -576,9 +576,9 @@ class Entity extends Position
|
|||
$x0 = $x0 < 0 ? 0 : $x0;
|
||||
$y0 = $y0 < 0 ? 0 : $y0;
|
||||
$z0 = $z0 < 0 ? 0 : $z0;
|
||||
$x1 = $x1 > 256 ? 256 : $x1;
|
||||
$y1 = $y1 > 128 ? 128 : $y1;
|
||||
$z1 = $z1 > 256 ? 256 : $z1;
|
||||
//$x1 = $x1 > 256 ? 256 : $x1;
|
||||
//$y1 = $y1 > 128 ? 128 : $y1;
|
||||
//$z1 = $z1 > 256 ? 256 : $z1;
|
||||
for($x = $x0; $x < $x1; ++$x){
|
||||
for($y = $y0; $y < $y1; ++$y){
|
||||
for($z = $z0; $z < $z1; ++$z){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue