Cleaned up SubChunk implementation

This commit is contained in:
Dylan K. Taylor
2017-06-19 15:40:31 +01:00
parent 938452bfe9
commit e11f1e94e9
8 changed files with 228 additions and 29 deletions

View File

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace pocketmine\level\format;
class SubChunk{
class SubChunk implements SubChunkInterface{
protected $ids;
protected $data;
@ -182,7 +182,7 @@ class SubChunk{
return substr($this->blockLight, (($x << 7) | ($z << 3)), 8);
}
public function getSkyLightColumn(int $x, int $z) : string{
public function getBlockSkyLightColumn(int $x, int $z) : string{
return substr($this->skyLight, (($x << 7) | ($z << 3)), 8);
}
@ -196,7 +196,7 @@ class SubChunk{
return $this->data;
}
public function getSkyLightArray() : string{
public function getBlockSkyLightArray() : string{
assert(strlen($this->skyLight) === 2048, "Wrong length of skylight array, expecting 2048 bytes, got " . strlen($this->skyLight));
return $this->skyLight;
}