2017-04-23 14:42:51 +00:00
|
|
|
<?php
|
2017-05-10 15:03:04 +00:00
|
|
|
/**
|
|
|
|
* ____ __ __ ____
|
|
|
|
* /\ _`\ /\ \__ /\ \__ /\ _`\
|
|
|
|
* \ \ \L\ \ __ \ \ ,_\\ \ ,_\ __ _ __ \ \ \L\_\ __ ___
|
|
|
|
* \ \ _ <' /'__`\\ \ \/ \ \ \/ /'__`\/\`'__\\ \ \L_L /'__`\ /' _ `\
|
|
|
|
* \ \ \L\ \/\ __/ \ \ \_ \ \ \_ /\ __/\ \ \/ \ \ \/, \/\ __/ /\ \/\ \
|
|
|
|
* \ \____/\ \____\ \ \__\ \ \__\\ \____\\ \_\ \ \____/\ \____\\ \_\ \_\
|
|
|
|
* \/___/ \/____/ \/__/ \/__/ \/____/ \/_/ \/___/ \/____/ \/_/\/_/
|
2017-05-11 11:29:22 +00:00
|
|
|
* Tomorrow's pocketmine generator.
|
2017-05-10 15:03:04 +00:00
|
|
|
* @author Ad5001
|
|
|
|
* @link https://github.com/Ad5001/BetterGen
|
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 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 {
|
|
|
|
public function __construct() {
|
2017-05-11 11:29:22 +00:00
|
|
|
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 ();
|
|
|
|
|
2017-04-29 09:59:44 +00:00
|
|
|
$this->addPopulator($cactus);
|
|
|
|
$this->addPopulator($deadBush);
|
|
|
|
$this->addPopulator($sugarCane);
|
|
|
|
$this->addPopulator($temple);
|
|
|
|
$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([
|
|
|
|
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-23 14:42:51 +00:00
|
|
|
}
|
|
|
|
public function getName(): string {
|
2017-05-10 15:03:04 +00:00
|
|
|
return "BetterDesert";
|
2017-04-23 14:42:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Returns biome id
|
|
|
|
*/
|
|
|
|
public function getId() {
|
|
|
|
return Biome::DESERT;
|
|
|
|
}
|
|
|
|
}
|