This commit is contained in:
GameHerobrine 2023-08-05 00:57:46 +03:00
parent 2ad5a5650e
commit a21e532d2a
9 changed files with 104 additions and 152 deletions

View file

@ -40,13 +40,14 @@ class FarmlandBlock extends TransparentBlock{
}
public static function checkWaterStatic(Level $level, $x, $y, $z){
for($bx = $x - 4; $bx <= $x + 4; $bx++){
for($by = $y; $by <= $y + 1; $by++){
for($bz = $z - 4; $bz <= $z + 4; $bz++){
public static function checkWaterStatic(Level $level, $x, $y, $z)
{
for ($bx = $x - 4; $bx <= $x + 4; $bx++) {
for ($by = $y; $by <= $y + 1; $by++) {
for ($bz = $z - 4; $bz <= $z + 4; $bz++) {
$id = $level->level->getBlockID($bx, $by, $bz);
if($id === 8 || $id === 9){
if ($id === 8 || $id === 9) {
return true;
}
}