mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 19:50:18 +00:00
Refactor Level::chunkBlockHash() (makes no sense to put it here)
This commit is contained in:
@@ -268,10 +268,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
return PHP_INT_SIZE === 8 ? (($x & 0xFFFFFFF) << 36) | (($y & Level::Y_MASK) << 28) | ($z & 0xFFFFFFF) : $x . ":" . $y . ":" . $z;
|
||||
}
|
||||
|
||||
public static function chunkBlockHash(int $x, int $y, int $z) : int{
|
||||
return ($x << 12) | ($z << 8) | $y;
|
||||
}
|
||||
|
||||
public static function getBlockXYZ($hash, &$x, &$y, &$z){
|
||||
if(PHP_INT_SIZE === 8){
|
||||
$x = $hash >> 36;
|
||||
|
Reference in New Issue
Block a user