aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0225-Expose-LivingEntity-hurt-direction.patch
diff options
context:
space:
mode:
authorRiley Park <[email protected]>2024-05-15 17:06:59 -0700
committerGitHub <[email protected]>2024-05-15 17:06:59 -0700
commitf17519338bc589c045e0b32bfc37e048b23544d5 (patch)
treee50182ec698b4a9de8f366f485ee089b1901bbd9 /patches/api/0225-Expose-LivingEntity-hurt-direction.patch
parent3fc93581bb876e8149b2ca423375a98f5ca12d27 (diff)
downloadPaper-f17519338bc589c045e0b32bfc37e048b23544d5.tar.gz
Paper-f17519338bc589c045e0b32bfc37e048b23544d5.zip
Expose server build information (#10729)
* Expose server build information * squash patches * final tweaks --------- Co-authored-by: Jake Potrebic <[email protected]> Co-authored-by: masmc05 <[email protected]>
Diffstat (limited to 'patches/api/0225-Expose-LivingEntity-hurt-direction.patch')
-rw-r--r--patches/api/0225-Expose-LivingEntity-hurt-direction.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/patches/api/0225-Expose-LivingEntity-hurt-direction.patch b/patches/api/0225-Expose-LivingEntity-hurt-direction.patch
new file mode 100644
index 0000000000..2957bd50ae
--- /dev/null
+++ b/patches/api/0225-Expose-LivingEntity-hurt-direction.patch
@@ -0,0 +1,54 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Mark Vainomaa <[email protected]>
+Date: Sun, 13 Dec 2020 05:32:12 +0200
+Subject: [PATCH] Expose LivingEntity hurt direction
+
+
+diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
+index 5ecfb98540c00da05b13bc5370debb89c52cc76f..083d5798ccc7f37c6df5e234c7ef233202102b8f 100644
+--- a/src/main/java/org/bukkit/entity/HumanEntity.java
++++ b/src/main/java/org/bukkit/entity/HumanEntity.java
+@@ -348,6 +348,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
+ */
+ public void setCooldown(@NotNull Material material, int ticks);
+
++ // Paper start
++ /**
++ * Sets player hurt direction
++ *
++ * @param hurtDirection hurt direction
++ */
++ @Override
++ void setHurtDirection(float hurtDirection);
++ // Paper end
++
+ /**
+ * Get the sleep ticks of the player. This value may be capped.
+ *
+diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
+index ac8d9e3238a4d47170ba8e79bc5f259cbfd3fa33..b75b79512a8fd7054f0c0c08e34f6900309e522c 100644
+--- a/src/main/java/org/bukkit/entity/LivingEntity.java
++++ b/src/main/java/org/bukkit/entity/LivingEntity.java
+@@ -1201,4 +1201,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
+ */
+ void playPickupItemAnimation(@NotNull Item item, int quantity);
+ // Paper end - pickup animation API
++
++ // Paper start - hurt direction API
++ /**
++ * Gets player hurt direction
++ *
++ * @return hurt direction
++ */
++ float getHurtDirection();
++
++ /**
++ * Sets player hurt direction
++ *
++ * @param hurtDirection hurt direction
++ * @deprecated use {@link Player#setHurtDirection(float)}
++ */
++ @Deprecated
++ void setHurtDirection(float hurtDirection);
++ // Paper end - hurt direction API
+ }