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