mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Fixed other invisibility issues
This commit is contained in:
@ -120,14 +120,21 @@ class McRegion extends BaseLevelProvider{
|
||||
}
|
||||
|
||||
$tiles = "";
|
||||
$nbt = new NBT(NBT::LITTLE_ENDIAN);
|
||||
foreach($chunk->getTiles() as $tile){
|
||||
if($tile instanceof Spawnable){
|
||||
$nbt->setData($tile->getSpawnCompound());
|
||||
$tiles .= $nbt->write();
|
||||
|
||||
if(count($chunk->getTiles()) > 0){
|
||||
$nbt = new NBT(NBT::LITTLE_ENDIAN);
|
||||
$list = [];
|
||||
foreach($chunk->getTiles() as $tile){
|
||||
if($tile instanceof Spawnable){
|
||||
$list[] = $tile->getSpawnCompound();
|
||||
}
|
||||
}
|
||||
$nbt->setData($list);
|
||||
$tiles = $nbt->write();
|
||||
}
|
||||
|
||||
|
||||
|
||||
$heightmap = pack("C*", ...$chunk->getHeightMapArray());
|
||||
$biomeColors = pack("N*", ...$chunk->getBiomeColorArray());
|
||||
|
||||
|
Reference in New Issue
Block a user