mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Improved Falling blocks physics, entity kill, chunk unserialize, fixed flat generator color, fixed nbt tags __toString(), fixed explosion offsets, fixed increased player interaction range in creative
This commit is contained in:
@ -32,6 +32,7 @@ use pocketmine\block\RedstoneOre;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\level\ChunkManager;
|
||||
use pocketmine\level\format\FullChunk;
|
||||
use pocketmine\level\generator\biome\Biome;
|
||||
use pocketmine\level\generator\populator\Ore;
|
||||
use pocketmine\level\generator\populator\Populator;
|
||||
use pocketmine\math\Vector3;
|
||||
@ -110,10 +111,15 @@ class Flat extends Generator{
|
||||
|
||||
$this->chunk = clone $this->level->getChunk($chunkX, $chunkZ);
|
||||
$this->chunk->setGenerated();
|
||||
$c = Biome::getBiome($biome)->getColor();
|
||||
$R = $c >> 16;
|
||||
$G = ($c >> 8) & 0xff;
|
||||
$B = $c & 0xff;
|
||||
|
||||
for($Z = 0; $Z < 16; ++$Z){
|
||||
for($X = 0; $X < 16; ++$X){
|
||||
$this->chunk->setBiomeId($X, $Z, $biome);
|
||||
$this->chunk->setBiomeColor($X, $Z, $R, $G, $B);
|
||||
for($y = 0; $y < 128; ++$y){
|
||||
$this->chunk->setBlock($X, $y, $Z, ...$this->structure[$y]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user