Removed the need for subchunks to know their Y coordinates

This commit is contained in:
Dylan K. Taylor
2017-01-01 12:57:09 +00:00
parent e85d6d134e
commit 69061ba4ad
8 changed files with 29 additions and 80 deletions

View File

@@ -914,9 +914,8 @@ class Level implements ChunkManager, Metadatable{
}
foreach($chunk->getSubChunks() as $subChunk){
foreach($chunk->getSubChunks() as $Y => $subChunk){
if(!$subChunk->isEmpty()){
$Y = $subChunk->getY();
$k = mt_rand(0, 0x7fffffff);
for($i = 0; $i < 3; ++$i, $k >>= 10){
$x = $k & 0x0f;