mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Fixed totem activating when having 1HP instead of 0HP (#5380)
This commit is contained in:
parent
1a8c8af523
commit
3a2a23b236
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user