diff --git a/src/world/format/SubChunk.php b/src/world/format/SubChunk.php index d8546e7e92..cc66734308 100644 --- a/src/world/format/SubChunk.php +++ b/src/world/format/SubChunk.php @@ -134,11 +134,8 @@ class SubChunk{ foreach($this->blockLayers as $layer){ $layer->collectGarbage(); - foreach($layer->getPalette() as $p){ - if($p !== $this->emptyBlockId){ - $cleanedLayers[] = $layer; - continue 2; - } + if($layer->getBitsPerBlock() !== 0 || $layer->get(0, 0, 0) !== $this->emptyBlockId){ + $cleanedLayers[] = $layer; } } $this->blockLayers = $cleanedLayers;