BetterGen/src/Ad5001/BetterGen/biome/BetterDesert.php

101 lines
3.4 KiB
PHP
Raw Normal View History

2017-04-23 14:42:51 +00:00
<?php
/**
* ____ __ __ ____
* /\ _`\ /\ \__ /\ \__ /\ _`\
* \ \ \L\ \ __ \ \ ,_\\ \ ,_\ __ _ __ \ \ \L\_\ __ ___
* \ \ _ <' /'__`\\ \ \/ \ \ \/ /'__`\/\`'__\\ \ \L_L /'__`\ /' _ `\
* \ \ \L\ \/\ __/ \ \ \_ \ \ \_ /\ __/\ \ \/ \ \ \/, \/\ __/ /\ \/\ \
* \ \____/\ \____\ \ \__\ \ \__\\ \____\\ \_\ \ \____/\ \____\\ \_\ \_\
* \/___/ \/____/ \/__/ \/__/ \/____/ \/_/ \/___/ \/____/ \/_/\/_/
* Tomorrow's pocketmine generator.
2017-05-14 18:13:15 +00:00
* @author Ad5001 <mail@ad5001.eu>, XenialDan <https://github.com/thebigsmileXD>
* @link https://github.com/Ad5001/BetterGen
2017-05-14 18:13:15 +00:00
* @category World Generator
* @api 3.0.0
* @version 1.1
2017-04-23 14:42:51 +00:00
*/
namespace Ad5001\BetterGen\biome;
use Ad5001\BetterGen\populator\CactusPopulator;
use Ad5001\BetterGen\populator\DeadbushPopulator;
use Ad5001\BetterGen\populator\SugarCanePopulator;
2017-05-11 12:07:26 +00:00
use Ad5001\BetterGen\populator\TemplePopulator;
use Ad5001\BetterGen\populator\WellPopulator;
use Ad5001\BetterGen\generator\BetterNormal;
2017-05-11 12:07:26 +00:00
use pocketmine\block\Block;
use pocketmine\level\generator\biome\Biome;
use pocketmine\level\generator\normal\biome\SandyBiome;
2017-04-23 14:42:51 +00:00
class BetterDesert extends SandyBiome implements Mountainable {
2017-05-14 19:03:47 +00:00
/**
* Constructs the class
*/
2017-04-23 14:42:51 +00:00
public function __construct() {
parent::__construct();
2017-04-23 14:42:51 +00:00
$deadBush = new DeadbushPopulator ();
2017-04-29 09:59:44 +00:00
$deadBush->setBaseAmount(1);
$deadBush->setRandomAmount(2);
2017-04-23 14:42:51 +00:00
$cactus = new CactusPopulator ();
2017-04-29 09:59:44 +00:00
$cactus->setBaseAmount(1);
$cactus->setRandomAmount(2);
2017-04-23 14:42:51 +00:00
$sugarCane = new SugarCanePopulator ();
2017-04-29 09:59:44 +00:00
$sugarCane->setRandomAmount(20);
$sugarCane->setBaseAmount(3);
2017-04-23 14:42:51 +00:00
$temple = new TemplePopulator ();
$well = new WellPopulator ();
if(!\Ad5001\BetterGen\utils\CommonUtils::in_arrayi("Cactus", BetterNormal::$options["delStruct"])) $this->addPopulator($cactus);
if(!\Ad5001\BetterGen\utils\CommonUtils::in_arrayi("Deadbush", BetterNormal::$options["delStruct"])) $this->addPopulator($deadBush);
if(!\Ad5001\BetterGen\utils\CommonUtils::in_arrayi("SugarCane", BetterNormal::$options["delStruct"])) $this->addPopulator($sugarCane);
if(!\Ad5001\BetterGen\utils\CommonUtils::in_arrayi("Temples", BetterNormal::$options["delStruct"])) $this->addPopulator($temple);
if(!\Ad5001\BetterGen\utils\CommonUtils::in_arrayi("Wells", BetterNormal::$options["delStruct"])) $this->addPopulator($well);
2017-04-23 14:42:51 +00:00
2017-04-29 09:59:44 +00:00
$this->setElevation(63, 70);
2017-04-23 14:42:51 +00:00
// $this->setElevation(66, 70);
$this->temperature = 0.5;
$this->rainfall = 0;
2017-04-29 09:59:44 +00:00
$this->setGroundCover([
2017-05-13 21:27:10 +00:00
Block::get(Block::SAND, 0),
Block::get(Block::SAND, 0),
Block::get(Block::SAND, 0),
Block::get(Block::SAND, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0),
Block::get(Block::SANDSTONE, 0)
2017-04-29 09:59:44 +00:00
]);
2017-04-23 14:42:51 +00:00
}
2017-05-14 19:03:47 +00:00
/**
* Constructs the class
*
* @return string
*/
2017-04-23 14:42:51 +00:00
public function getName(): string {
return "BetterDesert";
2017-04-23 14:42:51 +00:00
}
2017-05-14 19:03:47 +00:00
/**
2017-04-23 14:42:51 +00:00
* Returns biome id
2017-05-14 19:03:47 +00:00
*
* @return int
2017-04-23 14:42:51 +00:00
*/
2017-05-14 19:03:47 +00:00
public function getId(): int {
2017-04-23 14:42:51 +00:00
return Biome::DESERT;
}
}