mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
parent
97deadc59f
commit
6c92a2e88b
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user