mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
added ability to disable light updates
This commit is contained in:
parent
207dd0ffcd
commit
c2faff0f22
3 changed files with 15 additions and 4 deletions
|
|
@ -532,6 +532,7 @@ class Level{
|
|||
public $lightUpdates = [];
|
||||
public $lightUpdateIndx = -1;
|
||||
public function handleBlockLightUpdate($minX, $minY, $minZ, $maxX, $maxY, $maxZ){
|
||||
if(!PocketMinecraftServer::$ENABLE_LIGHT_UPDATES) return;
|
||||
for($x = $minX; $x <= $maxX; ++$x){
|
||||
for($z = $minZ; $z <= $maxZ; ++$z){
|
||||
for($y = $minY; $y <= $maxY; ++$y){
|
||||
|
|
@ -604,6 +605,7 @@ class Level{
|
|||
* @param int $maxZ - must be in range (0, 255). Must be more than minZ.
|
||||
*/
|
||||
public function updateLight($layer, $minX, $minY, $minZ, $maxX, $maxY, $maxZ){
|
||||
if(!PocketMinecraftServer::$ENABLE_LIGHT_UPDATES) return;
|
||||
/*$max = 5; //no idea is it needed for block light
|
||||
$sz = $this->lightUpdateIndx;
|
||||
if($sz < $max) $max = $sz;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue