◆ addPopulator()
- Parameters
-
162 $this->populators[get_class($populator)] = $populator;
◆ clearPopulators()
155 $this->populators = [];
◆ getBiome()
- Parameters
-
- Returns
- Biome
151 return isset(self::$biomes[$id]) ? self::$biomes[$id] : self::$biomes[self::OCEAN];
◆ getGroundCover()
- Returns
- Block[]
230 return $this->groundCover;
◆ getId()
◆ getMaxElevation()
214 return $this->maxElevation;
◆ getMinElevation()
210 return $this->minElevation;
◆ getName()
◆ getPopulators()
- Returns
- Populator[]
190 return $this->populators;
◆ getRainfall()
◆ getTemperature()
◆ init()
124 self::register(self::OCEAN,
new OceanBiome());
125 self::register(self::PLAINS,
new PlainBiome());
126 self::register(self::DESERT,
new DesertBiome());
127 self::register(self::MOUNTAINS,
new MountainsBiome());
128 self::register(self::FOREST,
new ForestBiome());
129 self::register(self::TAIGA,
new TaigaBiome());
130 self::register(self::SWAMP,
new SwampBiome());
131 self::register(self::RIVER,
new RiverBiome());
133 self::register(self::BEACH,
new BeachBiome());
134 self::register(self::MESA,
new MesaBiome());
136 self::register(self::ICE_PLAINS,
new IcePlainsBiome());
139 self::register(self::SMALL_MOUNTAINS,
new SmallMountainsBiome());
140 self::register(self::HELL,
new HellBiome());
◆ populateChunk()
- Parameters
-
181 foreach($this->populators as $populator){
182 $populator->populate($level, $chunkX, $chunkZ, $random);
◆ register()
static register |
( |
|
$id, |
|
|
Biome |
$biome |
|
) |
| |
|
staticprotected |
- Parameters
-
105 self::$biomes[(int) $id] = $biome;
106 $biome->setId((
int) $id);
108 $flowerPopFound =
false;
110 foreach($biome->getPopulators() as $populator){
111 if($populator instanceof Flower){
112 $flowerPopFound =
true;
117 if($flowerPopFound ===
false){
118 $flower =
new Flower();
119 $biome->addPopulator($flower);
◆ removePopulator()
removePopulator |
( |
|
$class | ) |
|
- Parameters
-
169 if(isset($this->populators[$class])){
170 unset($this->populators[$class]);
◆ setElevation()
setElevation |
( |
|
$min, |
|
|
|
$max |
|
) |
| |
- Parameters
-
222 $this->minElevation = $min;
223 $this->maxElevation = $max;
◆ setGroundCover()
setGroundCover |
( |
array |
$covers | ) |
|
- Parameters
-
237 $this->groundCover = $covers;
◆ setId()
- Parameters
-
197 if(!$this->registered){
198 $this->registered =
true;
◆ $rainfall
◆ $temperature
◆ BEACH
◆ BIRCH_FOREST
◆ BIRCH_FOREST_HILLS
const BIRCH_FOREST_HILLS = 28 |
◆ COLD_TAIGA
◆ COLD_TAIGA_HILLS
const COLD_TAIGA_HILLS = 31 |
◆ DESERT
◆ DESERT_HILLS
◆ END
◆ EXTREME_HILLS_PLUS
const EXTREME_HILLS_PLUS = 34 |
◆ FOREST
◆ FOREST_HILLS
◆ FROZEN_OCEAN
◆ FROZEN_RIVER
◆ HELL
◆ ICE_MOUNTAINS
◆ ICE_PLAINS
◆ MAX_BIOMES
◆ MEGA_TAIGA
◆ MEGA_TAIGA_HILLS
const MEGA_TAIGA_HILLS = 33 |
◆ MESA
◆ MESA_PLATEAU
◆ MESA_PLATEAU_F
const MESA_PLATEAU_F = 38 |
◆ MOUNTAINS
◆ MUSHROOM_ISLAND
const MUSHROOM_ISLAND = 14 |
◆ MUSHROOM_ISLAND_SHORE
const MUSHROOM_ISLAND_SHORE = 15 |
◆ OCEAN
◆ PLAINS
◆ RIVER
◆ ROOFED_FOREST
◆ SAVANNA
◆ SAVANNA_PLATEAU
const SAVANNA_PLATEAU = 36 |
◆ SMALL_MOUNTAINS
const SMALL_MOUNTAINS = 20 |
◆ SWAMP
◆ TAIGA
◆ TAIGA_HILLS
◆ VOID
The documentation for this class was generated from the following file:
- src/pocketmine/level/generator/biome/Biome.php