diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index fdafc66e7..9ffb0b8dd 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -437,6 +437,9 @@ abstract class Living extends Entity implements Damageable{ */ public function applyDamageModifiers(EntityDamageEvent $source) : void{ if($this->lastDamageCause !== null and $this->attackTime > 0){ + if($this->lastDamageCause->getBaseDamage() >= $source->getBaseDamage()){ + $source->setCancelled(); + } $source->setModifier(-$this->lastDamageCause->getBaseDamage(), EntityDamageEvent::MODIFIER_PREVIOUS_DAMAGE_COOLDOWN); } if($source->canBeReducedByArmor()){