From 6e6dc3eb4c410b1fe194786fe534ee2e03090007 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Fri, 8 Nov 2024 00:33:40 +0300 Subject: [PATCH] fixed bb detection when monster is attacking --- src/entity/Monster.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity/Monster.php b/src/entity/Monster.php index 674515d0..be046207 100644 --- a/src/entity/Monster.php +++ b/src/entity/Monster.php @@ -15,7 +15,7 @@ class Monster extends Creature{ * @see Entity::attackEntity() */ public function attackEntity($entity, $distance){ - if($distance < 2.0 && $entity->boundingBox->maxX > $this->boundingBox->minY && $entity->boundingBox->minY < $this->boundingBox->maxY){ + if($distance < 2.0 && $entity->boundingBox->maxY > $this->boundingBox->minY && $entity->boundingBox->minY < $this->boundingBox->maxY){ $entity->harm($this->getAttackDamage(), $this->eid); return true; }else{