fixed setBlock with non int coords

This commit is contained in:
GameHerobrine 2026-05-16 07:03:36 +03:00
parent 171390260d
commit 11737d0bda
2 changed files with 9 additions and 7 deletions

View file

@ -663,9 +663,11 @@ class PMFLevel extends PMF{
}elseif($this->chunks[$index][$Y] === false){
$this->fillMiniChunk($X, $Z, $Y);
}
$aX = $x - ($X << 4);
$aZ = $z - ($Z << 4);
$aY = $y - ($Y << 4);
$aX = $x & 0xf;
$aZ = $z & 0xf;
$aY = $y & 0xf;
$bindex = (int) ($aY + ($aX << 5) + ($aZ << 9));
$mindex = (int) (($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9));
$old_b = ord($this->chunks[$index][$Y][$bindex]);