fixed memory leak during light recalculation, importing the world saves nc level data and uses blocklight from vanilla world

This commit is contained in:
GameHerobrine 2025-07-20 13:30:49 +03:00
parent a61d4936c5
commit cc3f333660
4 changed files with 15 additions and 4 deletions

View file

@ -710,6 +710,7 @@ class Level{
if(!--$limit) return true;
}while($this->lightUpdateIndx >= 0);
if(count($this->lightUpdates) > 0) return true;
$this->lightUpdates = []; //php uses a lot of memory without this thing if it performed a lot of light updates
return false;
}
public function onTick(PocketMinecraftServer $server, $currentTime){