mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Chunk: use HeightArray::fill()
This commit is contained in:
parent
401e8d117b
commit
d53347454b
@ -30,7 +30,6 @@ use pocketmine\block\Block;
|
||||
use pocketmine\block\BlockLegacyIds;
|
||||
use pocketmine\block\tile\Tile;
|
||||
use pocketmine\data\bedrock\BiomeIds;
|
||||
use function array_fill;
|
||||
use function array_map;
|
||||
|
||||
class Chunk{
|
||||
@ -77,7 +76,7 @@ class Chunk{
|
||||
}
|
||||
|
||||
$val = ($this->subChunks->getSize() * SubChunk::EDGE_LENGTH);
|
||||
$this->heightMap = new HeightArray(array_fill(0, 256, $val)); //TODO: what about lazily initializing this?
|
||||
$this->heightMap = HeightArray::fill($val); //TODO: what about lazily initializing this?
|
||||
$this->biomeIds = $biomeIds ?? BiomeArray::fill(BiomeIds::OCEAN);
|
||||
|
||||
$this->terrainPopulated = $terrainPopulated;
|
||||
|
Loading…
x
Reference in New Issue
Block a user