mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Cast floats as integers on Level::getBlock() and Level::setBlock()
This commit is contained in:
parent
c00bfe3908
commit
84bb66357e
@ -317,8 +317,8 @@ class PMFLevel extends PMF{
|
||||
$aX = $x - ($X << 4);
|
||||
$aZ = $z - ($Z << 4);
|
||||
$aY = $y - ($Y << 4);
|
||||
$bindex = $aY + ($aX << 5) + ($aZ << 9);
|
||||
$mindex = ($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9);
|
||||
$bindex = (int) ($aY + ($aX << 5) + ($aZ << 9));
|
||||
$mindex = (int) (($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9));
|
||||
$b = ord($this->chunks[$index][$Y]{$bindex});
|
||||
$m = ord($this->chunks[$index][$Y]{$mindex});
|
||||
if(($y & 1) === 0){
|
||||
@ -349,8 +349,8 @@ class PMFLevel extends PMF{
|
||||
$aX = $x - ($X << 4);
|
||||
$aZ = $z - ($Z << 4);
|
||||
$aY = $y - ($Y << 4);
|
||||
$bindex = $aY + ($aX << 5) + ($aZ << 9);
|
||||
$mindex = ($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9);
|
||||
$bindex = (int) ($aY + ($aX << 5) + ($aZ << 9));
|
||||
$mindex = (int) (($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9));
|
||||
$old_b = ord($this->chunks[$index][$Y]{$bindex});
|
||||
$old_m = ord($this->chunks[$index][$Y]{$mindex});
|
||||
if(($y & 1) === 0){
|
||||
|
Loading…
x
Reference in New Issue
Block a user