From 4b17c605b4598c3ae79e1dcee09c7b9fc1479af0 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Mon, 6 Nov 2023 16:02:41 +0300 Subject: [PATCH] test fix --- src/utils/Utils.php | 2 +- src/world/Level.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/Utils.php b/src/utils/Utils.php index 2b7e14e5..1ce039ee 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -350,7 +350,7 @@ class Utils{ } public static function readShort($str, $signed = true){ - if(strlen($str) === 0){ + if(strlen($str) < 2){ return; } diff --git a/src/world/Level.php b/src/world/Level.php index b65a49e3..1da06491 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -351,7 +351,7 @@ class Level{ $index = $this->level->getIndex($cX, $cZ); if(!isset($this->level->chunks[$index]) || $this->level->chunks[$index] === false) continue; for($c = 0; $c <= 20; ++$c){ - $xyz = mt_rand(0, 0xffffffff) >> 2;//TODO fix php5 + $xyz = mt_rand(0, 0xffffffff) >> 2; $x = $xyz & 0xf; $z = ($xyz >> 8) & 0xf; //TODO might be possible to make some micro optmizations $y = ($xyz >> 16) & 0x7f;