From 3a2a23b236a3723dbd82e0b423ac0b3f61704386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Le=C3=B3n?= <58715544+JavierLeon9966@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:54:14 -0300 Subject: [PATCH] Fixed totem activating when having 1HP instead of 0HP (#5380) --- src/entity/Human.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity/Human.php b/src/entity/Human.php index 095d3ea86..ade87f981 100644 --- a/src/entity/Human.php +++ b/src/entity/Human.php @@ -356,7 +356,7 @@ class Human extends Living implements ProjectileSource, InventoryHolder{ && ($this->inventory->getItemInHand() instanceof Totem || $this->offHandInventory->getItem(0) instanceof Totem)){ $compensation = $this->getHealth() - $source->getFinalDamage() - 1; - if($compensation < 0){ + if($compensation <= -1){ $source->setModifier($compensation, EntityDamageEvent::MODIFIER_TOTEM); } }