RegionLoader: use actual null instead of zeroed entry for non-allocated chunks

this forces the code to be properly aware of non-allocated chunks, because it'll crash with NPE if it isn't.
This commit is contained in:
Dylan K. Taylor
2020-06-15 12:02:03 +01:00
parent 745be19a56
commit 6bf840c72e
2 changed files with 24 additions and 21 deletions

View File

@ -73,10 +73,6 @@ class RegionLocationTableEntry{
return $this->timestamp;
}
public function isNull() : bool{
return $this->firstSector === 0 or $this->sectorCount === 0;
}
public function overlaps(RegionLocationTableEntry $other) : bool{
$overlapCheck = static function(RegionLocationTableEntry $entry1, RegionLocationTableEntry $entry2) : bool{
$entry1Last = $entry1->getLastSector();