GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
ForestBiome Class Reference

Public Member Functions

 __construct ($type=self::TYPE_NORMAL)
 
 getName ()
 
- Public Member Functions inherited from GrassyBiome
 __construct ()
 
- Public Member Functions inherited from Biome
 clearPopulators ()
 
 addPopulator (Populator $populator)
 
 removePopulator ($class)
 
 populateChunk (ChunkManager $level, $chunkX, $chunkZ, Random $random)
 
 getPopulators ()
 
 setId ($id)
 
 getId ()
 
 getName ()
 
 getMinElevation ()
 
 getMaxElevation ()
 
 setElevation ($min, $max)
 
 getGroundCover ()
 
 setGroundCover (array $covers)
 
 getTemperature ()
 
 getRainfall ()
 

Data Fields

const TYPE_NORMAL = 0
 
const TYPE_BIRCH = 1
 
 $type
 
- Data Fields inherited from Biome
const OCEAN = 0
 
const PLAINS = 1
 
const DESERT = 2
 
const MOUNTAINS = 3
 
const FOREST = 4
 
const TAIGA = 5
 
const SWAMP = 6
 
const RIVER = 7
 
const HELL = 8
 
const END = 9
 
const FROZEN_OCEAN = 10
 
const FROZEN_RIVER = 11
 
const ICE_PLAINS = 12
 
const ICE_MOUNTAINS = 13
 
const MUSHROOM_ISLAND = 14
 
const MUSHROOM_ISLAND_SHORE = 15
 
const BEACH = 16
 
const DESERT_HILLS = 17
 
const FOREST_HILLS = 18
 
const TAIGA_HILLS = 19
 
const SMALL_MOUNTAINS = 20
 
const BIRCH_FOREST = 27
 
const BIRCH_FOREST_HILLS = 28
 
const ROOFED_FOREST = 29
 
const COLD_TAIGA = 30
 
const COLD_TAIGA_HILLS = 31
 
const MEGA_TAIGA = 32
 
const MEGA_TAIGA_HILLS = 33
 
const EXTREME_HILLS_PLUS = 34
 
const SAVANNA = 35
 
const SAVANNA_PLATEAU = 36
 
const MESA = 37
 
const MESA_PLATEAU_F = 38
 
const MESA_PLATEAU = 39
 
const VOID = 127
 
const MAX_BIOMES = 256
 

Additional Inherited Members

- Static Public Member Functions inherited from Biome
static init ()
 
static getBiome ($id)
 
- Static Protected Member Functions inherited from Biome
static register ($id, Biome $biome)
 
- Protected Attributes inherited from Biome
 $rainfall = 0.5
 
 $temperature = 0.5
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $type = self::TYPE_NORMAL)

ForestBiome constructor.

Parameters
int$type
40  {
41  parent::__construct();
42 
43  $this->type = $type;
44 
45  $trees = new Tree($type === self::TYPE_BIRCH ? Sapling::BIRCH : Sapling::OAK);
46  $trees->setBaseAmount(5);
47  $this->addPopulator($trees);
48 
49  $tallGrass = new TallGrass();
50  $tallGrass->setBaseAmount(3);
51 
52  $this->addPopulator($tallGrass);
53 
54  $this->setElevation(63, 81);
55 
56  if($type === self::TYPE_BIRCH){
57  $this->temperature = 0.6;
58  $this->rainfall = 0.5;
59  }else{
60  $this->temperature = 0.7;
61  $this->rainfall = 0.8;
62  }
63  }

Member Function Documentation

◆ getName()

getName ( )
Returns
string
68  : string{
69  return $this->type === self::TYPE_BIRCH ? "Birch Forest" : "Forest";
70  }

Field Documentation

◆ $type

$type

◆ TYPE_BIRCH

const TYPE_BIRCH = 1

◆ TYPE_NORMAL

const TYPE_NORMAL = 0

The documentation for this class was generated from the following file: