diff --git a/src/API/PluginAPI.php b/src/API/PluginAPI.php index f8b87aa8..808a3a26 100644 --- a/src/API/PluginAPI.php +++ b/src/API/PluginAPI.php @@ -148,7 +148,8 @@ class PluginAPI extends stdClass{ $aver = CURRENT_API_VERSION; if(!in_array((string) CURRENT_API_VERSION, $pluginInfo["api"])){ - console("[WARNING] API is not the same as Core, might cause bugs({$pluginInfo["api"]} != {$aver})"); + $s = implode(", ", $pluginInfo["api"]); + console("[WARNING] API is not the same as Core, might cause bugs({$s} != {$aver})"); } $phr = "phar://$filePath/"; diff --git a/src/world/Level.php b/src/world/Level.php index 93f25172..add23eed 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -477,7 +477,7 @@ class Level{ return false; } $this->changedCount[$X . ":" . $Y . ":" . $Z] = 4096; - if(ADVANCED_CACHE == true){ + if(ADVANCED_CACHE){ Cache::remove("world:{$this->name}:$X:$Z"); } return $this->level->setMiniChunk($X, $Z, $Y, $data); diff --git a/src/world/generator/ExperimentalGenerator.php b/src/world/generator/ExperimentalGenerator.php index b8f5bf09..a324e093 100644 --- a/src/world/generator/ExperimentalGenerator.php +++ b/src/world/generator/ExperimentalGenerator.php @@ -103,11 +103,9 @@ class ExperimentalGenerator implements NewLevelGenerator{ public function generateChunk($chunkX, $chunkZ){ $this->random->setSeed(0xdeadbeef ^ ($chunkX << 8) ^ $chunkZ ^ $this->level->level->getSeed()); - $noiseArray = ExperimentalGenerator::getFastNoise3D($this->noiseBase, 16, 128, 16, 4, 8, 4, $chunkX * 16, 0, $chunkZ * 16); - $biomeCache = []; - + $t = microtime(1); for($chunkY = 0; $chunkY < 8; ++$chunkY){ $chunk = ""; $startY = $chunkY << 4; @@ -164,6 +162,8 @@ class ExperimentalGenerator implements NewLevelGenerator{ } $this->level->setMiniChunk($chunkX, $chunkZ, $chunkY, $chunk); } + $t = microtime(1) - $t; + console("gen:".$t); foreach($this->genPopulators as $pop){