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-10-22 18:23:19 +02:00
|
|
|
index 25f671863e23fdb674c55f3e1f50b1f195ca5469..b9c19abe26c100558c4a0388d65c2316261ee1d3 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-08-09 22:05:50 +02:00
|
|
|
@@ -356,6 +356,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
|
|
|
|
+
|
|
|
|
/**
|
2024-10-22 18:23:19 +02:00
|
|
|
* Check whether a cooldown is active on the specified item.
|
2023-03-14 23:13:41 +01:00
|
|
|
*
|
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-09-15 21:39:53 +02:00
|
|
|
index 784da48ffc63bc932caafe58cf56ad30e7a86be6..49352ed3928163c6322634b8e6f1d3dd8caa5e74 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-09-15 21:39:53 +02:00
|
|
|
@@ -1211,4 +1211,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
|
|
|
}
|