mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Fix blockhash fail (this would have returned excessive Y coordinates including the bits for X!)
This commit is contained in:
parent
25560a52b0
commit
e92052c2ab
@ -275,7 +275,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
public static function getBlockXYZ($hash, &$x, &$y, &$z){
|
||||
if(PHP_INT_SIZE === 8){
|
||||
$x = $hash >> 36;
|
||||
$y = $hash >> 28; //it's always positive
|
||||
$y = ($hash >> 28) & Level::Y_MASK; //it's always positive
|
||||
$z = ($hash & 0xFFFFFFF) << 36 >> 36;
|
||||
}else{
|
||||
$hash = explode(":", $hash);
|
||||
|
Loading…
x
Reference in New Issue
Block a user