mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +00:00
Don't allocate subs that aren't going to be modified
This commit is contained in:
parent
c1542d853f
commit
87c16dab23
@ -121,7 +121,8 @@ class Flat extends Generator{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for($sy = 0; $sy < 256; $sy += 16){
|
$count = count($this->structure);
|
||||||
|
for($sy = 0; $sy < $count; $sy += 16){
|
||||||
$subchunk = $this->chunk->getSubChunk($sy >> 4, true);
|
$subchunk = $this->chunk->getSubChunk($sy >> 4, true);
|
||||||
for($y = 0; $y < 16 and isset($this->structure[$y | $sy]); ++$y){
|
for($y = 0; $y < 16 and isset($this->structure[$y | $sy]); ++$y){
|
||||||
list($id, $meta) = $this->structure[$y | $sy];
|
list($id, $meta) = $this->structure[$y | $sy];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user