mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added PMFLevel upgrade
This commit is contained in:
@ -149,10 +149,11 @@ class Level{
|
||||
}
|
||||
|
||||
public function generateChunk($X, $Z){
|
||||
$this->level->initCleanChunk($X, $Z);
|
||||
$this->generator->generateChunk($X, $Z);
|
||||
}
|
||||
|
||||
public function populateChunk($X, $Z){
|
||||
$this->generator->populateChunk($X, $Z);
|
||||
$this->level->saveChunk($X, $Z);
|
||||
}
|
||||
|
||||
public function __destruct(){
|
||||
|
@ -116,6 +116,8 @@ class NormalGenerator implements LevelGenerator{
|
||||
$this->random->setSeed(0xdeadbeef ^ ($chunkX << 8) ^ $chunkZ ^ $this->level->getSeed());
|
||||
$populator->populate($this->level, $chunkX, $chunkZ, $this->random);
|
||||
}
|
||||
|
||||
$this->level->level->setPopulated($chunkX, $chunkZ);
|
||||
}
|
||||
|
||||
public function populateLevel(){
|
||||
|
@ -134,6 +134,7 @@ class SuperflatGenerator implements LevelGenerator{
|
||||
$this->random->setSeed(0xdeadbeef ^ ($chunkX << 8) ^ $chunkZ ^ $this->level->getSeed());
|
||||
$populator->populate($this->level, $chunkX, $chunkZ, $this->random);
|
||||
}
|
||||
$this->level->level->setPopulated($chunkX, $chunkZ);
|
||||
}
|
||||
|
||||
public function populateLevel(){
|
||||
|
Reference in New Issue
Block a user