37    private \SplFixedArray $biomes;
 
   39    public function __construct(){
 
   40        $this->biomes = new \SplFixedArray(Biome::MAX_BIOMES);
 
   42        $this->
register(BiomeIds::OCEAN, 
new OceanBiome());
 
   43        $this->
register(BiomeIds::PLAINS, 
new PlainBiome());
 
   44        $this->
register(BiomeIds::DESERT, 
new DesertBiome());
 
   46        $this->
register(BiomeIds::FOREST, 
new ForestBiome());
 
   47        $this->
register(BiomeIds::TAIGA, 
new TaigaBiome());
 
   48        $this->
register(BiomeIds::SWAMPLAND, 
new SwampBiome());
 
   49        $this->
register(BiomeIds::RIVER, 
new RiverBiome());
 
   51        $this->
register(BiomeIds::HELL, 
new HellBiome());
 
   57        $this->
register(BiomeIds::BIRCH_FOREST, 
new ForestBiome(TreeType::BIRCH));
 
   60    public function register(
int $id, 
Biome $biome) : 
void{
 
   61        $this->biomes[$id] = $biome;
 
   65    public function getBiome(
int $id) : 
Biome{
 
   66        if($this->biomes[$id] === 
null){
 
   70        return $this->biomes[$id];