mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Generator works!
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
|
||||
namespace pocketmine\level\generator\biome;
|
||||
|
||||
use pocketmine\block\Block;
|
||||
use pocketmine\level\ChunkManager;
|
||||
use pocketmine\level\generator\normal\biome\BeachBiome;
|
||||
use pocketmine\level\generator\normal\biome\DesertBiome;
|
||||
@ -58,6 +59,11 @@ abstract class Biome{
|
||||
/** @var Populator[] */
|
||||
private $populators = [];
|
||||
|
||||
private $minElevation;
|
||||
private $maxElevation;
|
||||
|
||||
private $groundCover = [];
|
||||
|
||||
protected static function register($id, Biome $biome){
|
||||
self::$biomes[(int) $id] = $biome;
|
||||
$biome->setId((int) $id);
|
||||
@ -116,4 +122,31 @@ abstract class Biome{
|
||||
}
|
||||
|
||||
public abstract function getName();
|
||||
|
||||
public function getMinElevation(){
|
||||
return $this->minElevation;
|
||||
}
|
||||
|
||||
public function getMaxElevation(){
|
||||
return $this->maxElevation;
|
||||
}
|
||||
|
||||
public function setElevation($min, $max){
|
||||
$this->minElevation = $min;
|
||||
$this->maxElevation = $max;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Block[]
|
||||
*/
|
||||
public function getGroundCover(){
|
||||
return $this->groundCover;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Block[] $covers
|
||||
*/
|
||||
public function setGroundCover(array $covers){
|
||||
$this->groundCover = $covers;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user