Last active
August 1, 2020 17:10
-
-
Save MakStashkevich/eb7cf96bcd965dfaa3604db02a152344 to your computer and use it in GitHub Desktop.
Convert chunk XZ to world XZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$chunkX = -10; | |
$chunkZ = 10; | |
$minX = $chunkX << 4; | |
$maxX = $minX + 16; | |
$minZ = $chunkZ << 4; | |
$maxZ = $minZ + 16; | |
echo 'Chunk(X:' . $chunkX . ', Z:' . $chunkZ .') (minX:' . $minX . ', maxX:' . $maxX . ', minZ:' . $minZ . ', maxZ:' . $maxZ . ')'; | |
// Chunk(X:-10, Z:10) (minX:-160, maxX:-144, minZ:160, maxZ:176) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment