diff options
Diffstat (limited to 'patches/server/0593-Add-critical-damage-API.patch')
-rw-r--r-- | patches/server/0593-Add-critical-damage-API.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/patches/server/0593-Add-critical-damage-API.patch b/patches/server/0593-Add-critical-damage-API.patch index 47b65264af..b3f7792da1 100644 --- a/patches/server/0593-Add-critical-damage-API.patch +++ b/patches/server/0593-Add-critical-damage-API.patch @@ -28,10 +28,10 @@ index c1d121d83591ca1b5bf9d9406c9622b4f24eafef..aee26dd78953ff43306aaa64161f5b9e + // Paper end - add critical damage API } diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index c817d7cfa9bdef98aef6ac2df304ac5c2aa80649..6a0c177859da18d8b1ccaa45eab477d2f5822888 100644 +index 7fee6ffeb8ccde965fcc1454eb0d8c6b3637da41..e772b6a501b225f13399365ad743cabe5f6f792e 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1292,6 +1292,7 @@ public abstract class Player extends LivingEntity { +@@ -1293,6 +1293,7 @@ public abstract class Player extends LivingEntity { flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits if (flag2) { @@ -39,13 +39,13 @@ index c817d7cfa9bdef98aef6ac2df304ac5c2aa80649..6a0c177859da18d8b1ccaa45eab477d2 f *= 1.5F; } -@@ -1351,7 +1352,7 @@ public abstract class Player extends LivingEntity { +@@ -1352,7 +1353,7 @@ public abstract class Player extends LivingEntity { float f7 = this.getEnchantedDamage(entityliving2, f6, damagesource) * f2; // CraftBukkit start - Only apply knockback if the damage hits -- if (entityliving2.hurt(this.damageSources().playerAttack(this).sweep(), f7)) { -+ if (entityliving2.hurt(this.damageSources().playerAttack(this).sweep().critical(flag2), f7)) { // Paper - add critical damage API - entityliving2.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this, io.papermc.paper.event.entity.EntityKnockbackEvent.Cause.SWEEP_ATTACK); // CraftBukkit // Paper - knockback events +- if (!entityliving2.hurt(this.damageSources().playerAttack(this).sweep(), f7)) { ++ if (!entityliving2.hurt(this.damageSources().playerAttack(this).sweep().critical(flag2), f7)) { // Paper - add critical damage API + continue; } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -61,7 +61,7 @@ index 746bb8a36bd6c6ef953289576af499caad588d79..57ebb96707748e90810dc07471f9769f int k = entity.getRemainingFireTicks(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 18b2a6db3adee2ac2630d500005e0a4034cfbad7..76e262cc2d6686096eb7b58b6e7343c2a0ecafe5 100644 +index b53b457b55d22eae7114cafc85e63e9aa5b0b4b2..ebe547736862b38dd11727124cdd70c7abe7d791 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1065,7 +1065,7 @@ public class CraftEventFactory { |