3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Paper/patches/api/0241-Expose-LivingEntity-hurt-direction.patch

31 Zeilen
1.0 KiB
Diff

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
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 607696debd78e143b5a1de6e90a9b6d15dc98e96..087a9c54bc11d5d87aa90bf9d8e66fdac2c44457 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
@@ -851,5 +851,19 @@ 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
+ */
+ void setHurtDirection(float hurtDirection);
// Paper end
}