mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-21 06:52:21 +01:00
Fix wolves ignoring result of damage event (#11932)
This commit is contained in:
parent
49d15f6345
commit
b34ae4fb3c
@ -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 New Issue
Block a user