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
|
2023-06-08 21:35:20 +02:00
|
|
|
index 94f2c3167f4ce7f5f2b4ecc067739c64af0a2508..4054d2c836342f0e4bcbd33adb13f50daea5086a 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
|
|
|
|
@@ -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.
|
|
|
|
*
|
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
|
2023-12-25 23:51:56 +01:00
|
|
|
index 92a84d28f06c4a95fe0d5b2a3c1f73f0b07839d5..2d634e03c14d9f6fdc767e7dfe35e8ae0088cee9 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
|
2023-12-25 23:51:56 +01:00
|
|
|
@@ -1057,5 +1057,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
2021-06-11 14:02:28 +02:00
|
|
|
* @param quantity quantity of item
|
|
|
|
*/
|
|
|
|
void playPickupItemAnimation(@NotNull Item item, int quantity);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 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);
|
|
|
|
// Paper end
|
|
|
|
}
|