Ladder: be more strict about resetting fall distance

closes #2790
This commit is contained in:
Dylan K. Taylor 2019-02-26 19:54:57 +00:00
parent 97deadc59f
commit 6c92a2e88b

View File

@ -58,8 +58,10 @@ class Ladder extends Transparent{
}
public function onEntityCollide(Entity $entity) : void{
$entity->resetFallDistance();
$entity->onGround = true;
if($entity->asVector3()->floor()->distanceSquared($this) < 1){ //entity coordinates must be inside block
$entity->resetFallDistance();
$entity->onGround = true;
}
}
protected function recalculateBoundingBox() : ?AxisAlignedBB{