Entity: fixed recalculateCollisionBox not taking ySize into account

this was causing the movement anti-cheat to shit itself after the first movement because it used setPosition() on the player if the position wasn't exactly perfect (which obviously it never is perfect, because of fp rounding errors).
This commit is contained in:
Dylan K. Taylor 2020-08-23 17:51:36 +01:00
parent e59a4296f8
commit 2d77b1e364

View File

@ -707,10 +707,10 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
$this->boundingBox->setBounds(
$this->x - $halfWidth,
$this->y,
$this->y + $this->ySize,
$this->z - $halfWidth,
$this->x + $halfWidth,
$this->y + $this->height,
$this->y + $this->height + $this->ySize,
$this->z + $halfWidth
);
}