mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
chunks are now unloaded from memory + rewrite
This commit is contained in:
parent
5cdfedfc75
commit
c371fb9c8a
7 changed files with 298 additions and 208 deletions
|
|
@ -219,7 +219,14 @@ class PMFLevel extends PMF{
|
|||
$aZ = $z & 15;
|
||||
$this->chunkInfo[$index][0][$aX + ($aZ << 4)] = chr($id);
|
||||
}
|
||||
|
||||
public function forceUnloadChunk($X, $Z, $save = true){
|
||||
$X = (int) $X;
|
||||
$Z = (int) $Z;
|
||||
$index = $this->getIndex($X, $Z);
|
||||
$this->chunks[$index] = null;
|
||||
$this->chunkChange[$index] = null;
|
||||
unset($this->chunks[$index], $this->chunkChange[$index]);
|
||||
}
|
||||
public function unloadChunk($X, $Z, $save = true){
|
||||
$X = (int) $X;
|
||||
$Z = (int) $Z;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue