mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-18 23:23:19 +01:00
Fix wolves ignoring result of damage event (#11932)
This commit is contained in:
parent
49d15f6345
commit
b34ae4fb3c
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@
|
|||
+ public boolean actuallyHurt(ServerLevel level, DamageSource damageSource, float amount, org.bukkit.event.entity.EntityDamageEvent event) { // CraftBukkit - void -> boolean
|
||||
if (!this.canArmorAbsorb(damageSource)) {
|
||||
- super.actuallyHurt(level, damageSource, amount);
|
||||
+ super.actuallyHurt(level, damageSource, amount, event); // CraftBukkit
|
||||
+ return super.actuallyHurt(level, damageSource, amount, event); // CraftBukkit
|
||||
} else {
|
||||
+ if (event.isCancelled()) return false; // CraftBukkit - SPIGOT-7815: if the damage was cancelled, no need to run the wolf armor behaviour
|
||||
ItemStack bodyArmorItem = this.getBodyArmorItem();
|
||||
|
|
Loading…
Reference in a new issue