2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
|
|
|
Date: Sun, 13 Dec 2020 05:32:12 +0200
|
|
|
|
Subject: [PATCH] Expose LivingEntity hurt direction
|
|
|
|
|
|
|
|
|
2023-03-14 23:13:41 +01:00
|
|
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
2024-07-06 21:19:14 +02:00
|
|
|
index b980d55b68ed9da78c5cd19f369bb00dccbf08e1..4d6ceca22d98a3e46aa26ef26176c5417a5ccf35 100644
|
2023-03-14 23:13:41 +01:00
|
|
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
2024-07-06 21:19:14 +02:00
|
|
|
@@ -354,6 +354,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
2023-03-14 23:13:41 +01:00
|
|
|
*/
|
|
|
|
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.
|
|
|
|
*
|
2021-06-11 14:02:28 +02:00
|
|
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
2024-06-13 17:45:43 +02:00
|
|
|
index a2489932c07b1b56d3e340ecfeddd3df95cf4eb6..4327045ec437c9c81bcd4c34c4959de6d5798132 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
2024-04-23 19:02:08 +02:00
|
|
|
@@ -1201,4 +1201,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
2021-06-11 14:02:28 +02:00
|
|
|
*/
|
|
|
|
void playPickupItemAnimation(@NotNull Item item, int quantity);
|
2024-04-06 21:53:39 +02:00
|
|
|
// Paper end - pickup animation API
|
2021-06-11 14:02:28 +02:00
|
|
|
+
|
2024-04-06 21:53:39 +02:00
|
|
|
+ // Paper start - hurt direction API
|
2021-06-11 14:02:28 +02:00
|
|
|
+ /**
|
|
|
|
+ * Gets player hurt direction
|
|
|
|
+ *
|
|
|
|
+ * @return hurt direction
|
|
|
|
+ */
|
|
|
|
+ float getHurtDirection();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Sets player hurt direction
|
|
|
|
+ *
|
|
|
|
+ * @param hurtDirection hurt direction
|
2023-03-14 23:13:41 +01:00
|
|
|
+ * @deprecated use {@link Player#setHurtDirection(float)}
|
2021-06-11 14:02:28 +02:00
|
|
|
+ */
|
2023-03-14 23:13:41 +01:00
|
|
|
+ @Deprecated
|
2021-06-11 14:02:28 +02:00
|
|
|
+ void setHurtDirection(float hurtDirection);
|
2024-04-06 21:53:39 +02:00
|
|
|
+ // Paper end - hurt direction API
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|