mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Generator: small reduction of code duplication
This commit is contained in:
@@ -52,10 +52,18 @@ abstract class Generator{
|
||||
return $convertedSeed;
|
||||
}
|
||||
|
||||
/** @var ChunkManager */
|
||||
protected $level;
|
||||
/** @var Random */
|
||||
protected $random;
|
||||
|
||||
abstract public function __construct(array $settings = []);
|
||||
|
||||
|
||||
abstract public function init(ChunkManager $level, Random $random);
|
||||
public function init(ChunkManager $level, Random $random){
|
||||
$this->level = $level;
|
||||
$this->random = $random;
|
||||
}
|
||||
|
||||
abstract public function generateChunk(int $chunkX, int $chunkZ);
|
||||
|
||||
|
Reference in New Issue
Block a user