From 390bc631c83b98c0895529bbaefa2e9b0150d4c4 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 26 Oct 2020 16:04:31 +0000 Subject: [PATCH] SubChunk: added moveToChunk() --- src/world/utils/SubChunkExplorer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/world/utils/SubChunkExplorer.php b/src/world/utils/SubChunkExplorer.php index 7dd1fc0db..a50226bbb 100644 --- a/src/world/utils/SubChunkExplorer.php +++ b/src/world/utils/SubChunkExplorer.php @@ -86,6 +86,11 @@ class SubChunkExplorer{ return true; } + public function moveToChunk(int $chunkX, int $chunkY, int $chunkZ, bool $create) : bool{ + //this is a cold path, so we don't care much if it's a bit slower (extra fcall overhead) + return $this->moveTo($chunkX << 4, $chunkY << 4, $chunkZ << 4, $create); + } + /** * @phpstan-param \Closure() : void $callback */