new ai task, fixes of old ones, php8 fixes

This commit is contained in:
GameHerobrine 2022-12-24 22:42:23 +03:00
parent a907a7cf5e
commit 80bdddb817
13 changed files with 1581 additions and 1458 deletions

View file

@ -436,8 +436,15 @@ class PMFLevel extends PMF{
$aZ = $z - ($Z << 4);
$aY = $y - ($Y << 4);
#Need to fix. But idk how.
$b = ord($this->chunks[$index][$Y][(int) ($aY + ($aX << 5) + ($aZ << 9))]);
$m = ord($this->chunks[$index][$Y][(int) (($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9))]);
if(is_array($this->chunks) && is_array($this->chunks[$index]) && is_string($this->chunks[$index][$Y])){ //PHP8 warn fix
$b = ord($this->chunks[$index][$Y][(int) ($aY + ($aX << 5) + ($aZ << 9))]);
$m = ord($this->chunks[$index][$Y][(int) (($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9))]);
}else{
console(get_class($this->chunks[$index][$Y]));
$b = 0;
$m = 0;
}
if(($y & 1) === 0){
$m = $m & 0x0F;
}else{