Player: fixed suspicious ground state check

fixes #3552 and #3553 for non-spectator-gamemode situations
this would've caused problems if setHasBlockCollision(false) was used in other game modes
This commit is contained in:
Dylan K. Taylor
2025-10-19 00:34:14 +01:00
parent 2d0dd72ae7
commit 806d88ec20

View File

@@ -1304,7 +1304,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer, Nev
}
protected function checkGroundState(float $wantedX, float $wantedY, float $wantedZ, float $dx, float $dy, float $dz) : void{
if($this->gamemode === GameMode::SPECTATOR){
if(!$this->blockCollision){
$this->onGround = false;
}else{
$bb = clone $this->boundingBox;