setblock fixes

coordinate check should be inclusive of min and max values, and max for y coordinate should be 127.
This commit is contained in:
Kran 2024-03-26 00:28:57 -07:00
parent a10c6a1d57
commit fdd20675fa

View file

@ -273,7 +273,7 @@ class BlockAPI{
$coords[$i] = round($coord, 0);
}
elseif(is_numeric($args[$i])){
if($args[$i] > 0 and $args[$i] < 255){
if($args[$i] >= 0 and $args[$i] <= ($i === 1 ? 127 : 255)){
$coords[$i] = $args[$i];
}
}