Preparations for negative Y support

This commit is contained in:
Dylan K. Taylor
2021-11-08 17:28:22 +00:00
parent df39a1ca07
commit c6c992a1f0
8 changed files with 31 additions and 25 deletions

View File

@ -68,7 +68,7 @@ class SubChunkExplorer{
if($this->currentSubChunk === null or $this->currentY !== $newChunkY){
$this->currentY = $newChunkY;
if($this->currentY < 0 or $this->currentY >= $this->currentChunk->getHeight()){
if($this->currentY < Chunk::MIN_SUBCHUNK_INDEX or $this->currentY > Chunk::MAX_SUBCHUNK_INDEX){
$this->currentSubChunk = null;
return SubChunkExplorerStatus::INVALID;
}