mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
Clone initial chunk in Flat.php
The Flat generator destroys Chunk at 0,0. What happens is that it request the level to read Chunk at 0,0. It then uses that chunk to create the template chunk. However this obliterates whatever was in Chunk at 0,0. Added a line to "clone" this chunk, so when parsePreset generates the template chunk, all this goes to a copy rather than the original file chunk 0,0.
This commit is contained in:
parent
6bf30c133a
commit
8ae9cd4eaf
@ -106,7 +106,7 @@ class Flat extends Generator{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->chunk = $this->level->getChunk(0, 0);
|
$this->chunk = clone $this->level->getChunk(0, 0);
|
||||||
$this->chunk->setGenerated();
|
$this->chunk->setGenerated();
|
||||||
|
|
||||||
for($Z = 0; $Z < 16; ++$Z){
|
for($Z = 0; $Z < 16; ++$Z){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user