mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Region: Change chunk offset calculation in regions to use bitmasks
I don't know why it wasn't done like this to start with. However this has not been tested yet, so this goes on a different branch for now to test.
This commit is contained in:
@ -183,7 +183,7 @@ class RegionLoader{
|
||||
$this->lastUsed = time();
|
||||
$chunkData = $this->levelProvider->nbtSerialize($chunk);
|
||||
if($chunkData !== false){
|
||||
$this->saveChunk($chunk->getX() - ($this->getX() * 32), $chunk->getZ() - ($this->getZ() * 32), $chunkData);
|
||||
$this->saveChunk($chunk->getX() & 0x1f, $chunk->getZ() & 0x1f, $chunkData);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user