diff --git a/src/Ad5001/BetterGen/generator/BetterNormal.php b/src/Ad5001/BetterGen/generator/BetterNormal.php index 35eed87..05bfbb9 100644 --- a/src/Ad5001/BetterGen/generator/BetterNormal.php +++ b/src/Ad5001/BetterGen/generator/BetterNormal.php @@ -258,7 +258,7 @@ class BetterNormal extends Generator { if (is_string($ret )) { $ret = new $ret (); } - return $ret; + return $ret; } /* diff --git a/src/Ad5001/BetterGen/populator/CavePopulator.php b/src/Ad5001/BetterGen/populator/CavePopulator.php index feb31a1..8d885ce 100644 --- a/src/Ad5001/BetterGen/populator/CavePopulator.php +++ b/src/Ad5001/BetterGen/populator/CavePopulator.php @@ -92,7 +92,7 @@ class CavePopulator extends AmountPopulator { foreach($gen = $this->generateBranch($x, $y, $z, 5, 3, 5, $random ) as $v3 ) { $generatedBranches --; if ($generatedBranches <= 0) { - $gen->send(self::STOP); // send not found.. @Ad5001 what is that + $gen->send(self::STOP); } else { $gen->send(self::CONTINUE); } @@ -127,7 +127,6 @@ class CavePopulator extends AmountPopulator { } $repeat = $random->nextBoundedInt(25 ) + 15; while($repeat -- > 0 ) { - // echo "Y => $y; H => $height; L => $length; D => $depth; R => $repeat" . PHP_EOL; BuildingUtils::buildRandom($this->level, new Vector3($x, $y, $z ), new Vector3($length, $height, $depth ), $random, Block::get(Block::AIR )); $x += round(($random->nextBoundedInt(round(30 * ($length / 10) ) + 1 ) / 10 - 2)); $yP = $random->nextRange(- 14, 14); diff --git a/src/Ad5001/BetterGen/populator/DeadbushPopulator.php b/src/Ad5001/BetterGen/populator/DeadbushPopulator.php index 0859a69..6c9bcc4 100644 --- a/src/Ad5001/BetterGen/populator/DeadbushPopulator.php +++ b/src/Ad5001/BetterGen/populator/DeadbushPopulator.php @@ -40,7 +40,7 @@ class DeadbushPopulator extends AmountPopulator { $z = $random->nextRange($chunkZ * 16, $chunkZ * 16 + 15); if(!in_array($level->getChunk($chunkX, $chunkZ)->getBiomeId(abs($x % 16), ($z % 16)), [40, 39, Biome::DESERT])) continue; $y = $this->getHighestWorkableBlock($x, $z); - if ($y !== -1) { + if ($y !== -1 && $level->getBlockIdAt($x, $y - 1, $z ) == Block::SAND) { $level->setBlockIdAt($x, $y, $z, Block::DEAD_BUSH); $level->setBlockDataAt($x, $y, $z, 1); } diff --git a/src/Ad5001/BetterGen/structure/Well.php b/src/Ad5001/BetterGen/structure/Well.php index dcd55b9..eb0dcc1 100644 --- a/src/Ad5001/BetterGen/structure/Well.php +++ b/src/Ad5001/BetterGen/structure/Well.php @@ -23,7 +23,7 @@ use pocketmine\utils\Random; class Well extends Object { /** @var ChunkManager */ - private $level; + protected $level; public $overridable = [ Block::AIR => true, 6 => true, @@ -95,8 +95,8 @@ class Well extends Object { $this->placeBlock($x + ($direction [0] * 2), $y, $z + ($direction [1] * 2), Block::SANDSTONE); // Building slabs on the sides. Places two times due to all directions. - $this->placeBlock($x + ($direction [0] * 2), $y, $z, Block::SANDSTONE, 1); - $this->placeBlock($x, $y, $z + ($direction [1] * 2), Block::SANDSTONE, 1); + $this->placeBlock($x + ($direction [0] * 2), $y, $z, 44, 1); + $this->placeBlock($x, $y, $z + ($direction [1] * 2), 44, 1); // Placing water.Places two times due to all directions. $this->placeBlock($x + $direction [0], $y, $z, Block::WATER);