I have a custom generator that I am planning to use for my Plots server and I have a function that I need to edit to make the generated terrain look like this: http://imgur.com/a/uKiZW PHP: public function generateChunk($chunkX, $chunkZ) { $shape = $this->getShape($chunkX << 4, $chunkZ << 4); $chunk = $this->level->getChunk($chunkX, $chunkZ); $chunk->setGenerated(); $c = Biome::getBiome(1)->getColor(); $R = $c >> 16; $G = ($c >> 8) & 0xff; $B = $c & 0xff; $bottomBlockId = $this->bottomBlock->getId(); $bottomBlockMeta = $this->bottomBlock->getDamage(); $plotFillBlockId = $this->plotFillBlock->getId(); $plotFillBlockMeta = $this->plotFillBlock->getDamage(); $plotFloorBlockId = $this->plotFloorBlock->getId(); $plotFloorBlockMeta = $this->plotFloorBlock->getDamage(); $roadBlockId = $this->roadBlock->getId(); $roadBlockMeta = $this->roadBlock->getDamage(); $debugBlockId = $this->debugBlock->getId(); $debugBlockMeta = $this->debugBlock->getDamage(); $groundHeight = $this->groundHeight; for ($Z = 0; $Z < 16; ++$Z) { for ($X = 0; $X < 16; ++$X) { $chunk->setBiomeId($X, $Z, 1); $chunk->setBiomeColor($X, $Z, $R, $G, $B); $chunk->setBlock($X, 0, $Z, $bottomBlockId, $bottomBlockMeta); for ($Y = 1; $Y < $groundHeight-3; ++$Y) { $chunk->setBlock($X, $Y, $Z, Block::AIR, $plotFillBlockMeta); } for ($Y = $groundHeight-3; $Y < $groundHeight; ++$Y) { $chunk->setBlock($X, $Y, $Z, $plotFillBlockId, $plotFillBlockMeta); } $type = $shape[($Z << 4) | $X]; if ($type === self::PLOT) { $chunk->setBlock($X, $groundHeight, $Z, $plotFloorBlockId, $plotFloorBlockMeta); } elseif ($type === self::ROAD) { $chunk->setBlock($X, $groundHeight, $Z, $roadBlockId, $roadBlockMeta); } else { //$chunk->setBlock($X, $groundHeight, $Z, $debugBlockId, $debugBlockMeta); $chunk->setBlock($X, $groundHeight + 1, $Z, $debugBlockId, $debugBlockMeta); } } } $chunk->setX($chunkX); $chunk->setZ($chunkZ); $this->level->setChunk($chunkX, $chunkZ, $chunk); } Using the given info in the function, how can I generate the world to look like I want?
The world generators I have used in Pocketmine are a bit finicky. It may be just me, but I could never get a custom one to work.
well it works (or used to) and aparently resource of custom world generator are quite scares especially well documentation ones so world gen plugin are mostly uncommon
This is some code taken from the MyPlot world Generator. If there is anything else that I could be missing to be able to do that I want, please let me know.