Remove redundant if/else in Player->checkGroundState()

This commit is contained in:
Dylan K. Taylor 2017-11-18 15:59:51 +00:00
parent 81fe00a0a5
commit dc553142c9

View File

@ -1423,11 +1423,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
$bb->minY = $this->y - 0.2;
$bb->maxY = $this->y + 0.2;
if(count($this->level->getCollisionBlocks($bb, true)) > 0){
$this->onGround = true;
}else{
$this->onGround = false;
}
$this->onGround = count($this->level->getCollisionBlocks($bb, true)) > 0;
}
$this->isCollided = $this->onGround;
}