aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0551-Expose-LivingEntity-hurt-direction.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2021-12-22 10:02:31 -0800
committerGitHub <[email protected]>2021-12-22 10:02:31 -0800
commit82eaf4ee15d77303cdd352cce9b33c2f3e5d14d7 (patch)
tree53e4a42978675fc17acc76b85dcb0c3569ab3e3b /patches/server/0551-Expose-LivingEntity-hurt-direction.patch
parent6e5ceb34eb2ef4d6c0a35c46d0eded9099bb2fee (diff)
downloadPaper-82eaf4ee15d77303cdd352cce9b33c2f3e5d14d7.tar.gz
Paper-82eaf4ee15d77303cdd352cce9b33c2f3e5d14d7.zip
Fix duplicated BlockPistonRetractEvent call (#7111)
Diffstat (limited to 'patches/server/0551-Expose-LivingEntity-hurt-direction.patch')
-rw-r--r--patches/server/0551-Expose-LivingEntity-hurt-direction.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/patches/server/0551-Expose-LivingEntity-hurt-direction.patch b/patches/server/0551-Expose-LivingEntity-hurt-direction.patch
new file mode 100644
index 0000000000..2f461711f6
--- /dev/null
+++ b/patches/server/0551-Expose-LivingEntity-hurt-direction.patch
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mark Vainomaa <[email protected]>
+Date: Sun, 13 Dec 2020 05:32:05 +0200
+Subject: [PATCH] Expose LivingEntity hurt direction
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+index 24ffc967391c9ba175f41396a90007ecdc32f55c..0293d6fd1bb29f75fa1fa1cdfa36b3f679c1bc45 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+@@ -850,5 +850,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+ public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) {
+ getHandle().take(((CraftItem) item).getHandle(), quantity);
+ }
++
++ @Override
++ public float getHurtDirection() {
++ return getHandle().hurtDir;
++ }
++
++ @Override
++ public void setHurtDirection(float hurtDirection) {
++ getHandle().hurtDir = hurtDirection;
++ }
+ // Paper end
+ }