diff options
Diffstat (limited to 'patches/server/0602-Add-critical-damage-API.patch')
-rw-r--r-- | patches/server/0602-Add-critical-damage-API.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/server/0602-Add-critical-damage-API.patch b/patches/server/0602-Add-critical-damage-API.patch index 63bd12427b..80b6725bc2 100644 --- a/patches/server/0602-Add-critical-damage-API.patch +++ b/patches/server/0602-Add-critical-damage-API.patch @@ -28,7 +28,7 @@ index 9b5af216d38ff4584d40586403bd92207b230dfa..533ea6cbb813c8d1dc2bb3f65fd94d4f + // 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 5019b9f257382f15aa333a8d421915a7a3afe991..f18e370399fb36040cec64dd7bee4915e3cb56d7 100644 +index 56f7a753d2167504b6d91219093097323a9081c5..07afb966626d86b065e138959e9ffcac27a0d5d2 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -1274,7 +1274,7 @@ public abstract class Player extends LivingEntity { @@ -55,11 +55,11 @@ index 5019b9f257382f15aa333a8d421915a7a3afe991..f18e370399fb36040cec64dd7bee4915 // CraftBukkit start - Only apply knockback if the damage hits - if (entityliving.hurt(this.damageSources().playerAttack(this).sweep(), f4)) { + if (entityliving.hurt(this.damageSources().playerAttack(this).sweep().critical(flag2), f4)) { // Paper - add critical damage API - entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this, EntityKnockbackEvent.KnockbackCause.SWEEP_ATTACK); // CraftBukkit + entityliving.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 } // 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 -index 047629405dc67e3bcb5e4b3d5afa0e821f8fde44..8e8258333e181491b2d5b61ebdb80de36e8179a9 100644 +index 49dc01532f9b60b3f594abca56b7d807fe6716d5..427e889f58c86f7649fc1b661d55277599b320c0 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -392,6 +392,7 @@ public abstract class AbstractArrow extends Projectile { @@ -71,7 +71,7 @@ index 047629405dc67e3bcb5e4b3d5afa0e821f8fde44..8e8258333e181491b2d5b61ebdb80de3 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 63219a3e9aa7384c941d556cf24a6b3020968da9..c00667c0a27f96202439f45bddd2b79cd46e7c25 100644 +index 3102324bfdaa82826eead1f40d24bf13553f6506..efc3808dde268f8325304f4bce8fb3bf399adafd 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1064,7 +1064,7 @@ public class CraftEventFactory { |