mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
test fix
This commit is contained in:
parent
69d5589191
commit
4b17c605b4
2 changed files with 2 additions and 2 deletions
|
|
@ -350,7 +350,7 @@ class Utils{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function readShort($str, $signed = true){
|
public static function readShort($str, $signed = true){
|
||||||
if(strlen($str) === 0){
|
if(strlen($str) < 2){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@ class Level{
|
||||||
$index = $this->level->getIndex($cX, $cZ);
|
$index = $this->level->getIndex($cX, $cZ);
|
||||||
if(!isset($this->level->chunks[$index]) || $this->level->chunks[$index] === false) continue;
|
if(!isset($this->level->chunks[$index]) || $this->level->chunks[$index] === false) continue;
|
||||||
for($c = 0; $c <= 20; ++$c){
|
for($c = 0; $c <= 20; ++$c){
|
||||||
$xyz = mt_rand(0, 0xffffffff) >> 2;//TODO fix php5
|
$xyz = mt_rand(0, 0xffffffff) >> 2;
|
||||||
$x = $xyz & 0xf;
|
$x = $xyz & 0xf;
|
||||||
$z = ($xyz >> 8) & 0xf; //TODO might be possible to make some micro optmizations
|
$z = ($xyz >> 8) & 0xf; //TODO might be possible to make some micro optmizations
|
||||||
$y = ($xyz >> 16) & 0x7f;
|
$y = ($xyz >> 16) & 0x7f;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue