From 8d326abad8eddca1eba0cc88e486cefa3e5b7642 Mon Sep 17 00:00:00 2001 From: Doge Date: Sun, 14 Jul 2024 11:37:49 +0300 Subject: [PATCH] fix(Explosion): don't apply motion if the event's cancelled --- src/world/Explosion.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/world/Explosion.php b/src/world/Explosion.php index 601f9109e27..0298080c766 100644 --- a/src/world/Explosion.php +++ b/src/world/Explosion.php @@ -192,7 +192,9 @@ public function explodeB() : bool{ } $entity->attack($ev); - $entity->setMotion($entity->getMotion()->addVector($motion->multiply($impact))); + if(!$ev->isCancelled()) { + $entity->setMotion($entity->getMotion()->addVector($motion->multiply($impact))); + } } }