Stop hardcoding chunk dimensions everywhere (#4443)

This commit is contained in:
Dylan T
2021-09-10 16:13:25 +01:00
committed by GitHub
parent 9d5a86fe53
commit 4111d92b98
24 changed files with 166 additions and 140 deletions

View File

@ -216,8 +216,8 @@ class LevelDB extends BaseWorldProvider implements WritableWorldProvider{
self::deserializeExtraDataKey($chunkVersion, $key, $x, $fullY, $z);
$ySub = ($fullY >> 4) & 0xf;
$y = $key & 0xf;
$ySub = ($fullY >> SubChunk::COORD_BIT_SIZE);
$y = $key & SubChunk::COORD_MASK;
$blockId = $value & 0xff;
$blockData = ($value >> 8) & 0xf;