From 54ef3882b9531a0144bd946698aa095a78ef7a40 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Tue, 24 Jun 2025 13:05:19 +0300 Subject: [PATCH] small changes --- src/API/ConsoleAPI.php | 2 +- src/world/Level.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/API/ConsoleAPI.php b/src/API/ConsoleAPI.php index b32e415c..574e42e7 100644 --- a/src/API/ConsoleAPI.php +++ b/src/API/ConsoleAPI.php @@ -214,7 +214,7 @@ class ConsoleAPI{ foreach($this->server->api->level->levels as $level){ $lightUpdates += count($level->lightUpdates); } - return "TPS: {$info["tps"]}, Memory usage: {$info["memory_usage"]} (Peak {$info["memory_peak_usage"]}), Entities: {$info["entities"]}, Events: {$info["events"]}, Handlers: {$info["handlers"]}, Actions: {$info["actions"]}, Garbage: {$info["garbage"]} Light updates: {$lightUpdates}"; + return "TPS: {$info["tps"]}, Memory usage: {$info["memory_usage"]} (Peak {$info["memory_peak_usage"]}), Entities: {$info["entities"]}, Events: {$info["events"]}, Handlers: {$info["handlers"]}, Actions: {$info["actions"]}, Garbage: {$info["garbage"]}, Light updates: {$lightUpdates}"; } return "TPS: {$info["tps"]}, Memory usage: {$info["memory_usage"]} (Peak {$info["memory_peak_usage"]})"; case "stop": diff --git a/src/world/Level.php b/src/world/Level.php index 6536dfc6..868290c6 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -604,7 +604,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){ - /*$max = 5; no idea is it needed for block light + /*$max = 5; //no idea is it needed for block light $sz = $this->lightUpdateIndx; if($sz < $max) $max = $sz; for($i = 0; $i < $max; ++$i){ @@ -619,7 +619,7 @@ class Level{ $miY = ($upd >> 32) & 0xff; $miX = ($upd >> 40) & 0xff; if($miX <= $minX && $miY <= $minY && $miZ <= $minZ && $maX >= $maxX && $maY >= $maxY && $maZ >= $maxZ){ - console("light happen is scheduled to happen already"); + //console("light happen is scheduled to happen already"); return; } if($miX-1 > $minX || $miY-1 > $minY || $miZ-1 > $minZ || $maX+1 < $maxX || $maY+1 < $maxY || $maZ+1 < $maxZ){