pocketmine\level\generator\populator\TallGrass::setRandomAmount PHP Method

setRandomAmount() public method

public setRandomAmount ( $amount )
    public function setRandomAmount($amount)
    {
        $this->randomAmount = $amount;
    }

Usage Example

Ejemplo n.º 1
0
 public function init(GenerationChunkManager $level, Random $random)
 {
     $this->level = $level;
     $this->random = $random;
     $this->random->setSeed($this->level->getSeed());
     $this->noiseHills = new Simplex($this->random, 3, 0.1, 12);
     $this->noiseBase = new Simplex($this->random, 16, 0.6, 16);
     $ores = new Ore();
     $ores->setOreTypes([new OreType(new CoalOre(), 20, 16, 0, 128), new OreType(new IronOre(), 20, 8, 0, 64), new OreType(new RedstoneOre(), 8, 7, 0, 16), new OreType(new LapisOre(), 1, 6, 0, 32), new OreType(new GoldOre(), 2, 8, 0, 32), new OreType(new DiamondOre(), 1, 7, 0, 16), new OreType(new Dirt(), 20, 32, 0, 128), new OreType(new Gravel(), 10, 16, 0, 128)]);
     $this->populators[] = $ores;
     $trees = new Tree();
     $trees->setBaseAmount(1);
     $trees->setRandomAmount(1);
     $this->populators[] = $trees;
     $tallGrass = new TallGrass();
     $tallGrass->setBaseAmount(5);
     $tallGrass->setRandomAmount(0);
     $this->populators[] = $tallGrass;
 }
All Usage Examples Of pocketmine\level\generator\populator\TallGrass::setRandomAmount