From d55464a4b052b735f44e63567b417eae21ad6b14 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sat, 18 Feb 2023 20:24:21 +0300 Subject: [PATCH] made swimming work just as before --- src/entity/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 199aacca..48d02037 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -579,7 +579,7 @@ class Entity extends Position for($z = $z0; $z < $z1; ++$z){ $pos = new Vector3($x, $y, $z); $b = $this->level->getBlock($pos); - if($b->getID() === WATER || $b->getID() === STILL_WATER){ + if($b->y == ($y1 - 1) && $b->getID() === WATER || $b->getID() === STILL_WATER){ $water = true; } if($b != false && $b->isSolid){