mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
5730a94208
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 2b4582fb SPIGOT-5916: getLastColors does not work with the rgb colors CraftBukkit Changes: f7707086d SPIGOT-7299: Fix indirect/anvil damage events and minor improvements
53 lines
1.9 KiB
Diff
53 lines
1.9 KiB
Diff
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/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
|
index b0de996c7cbfc36a3f749091068a70885b009832..b21325401f59a02c0fb52d203e90b0f6207b556f 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 b09c9eb92c069f76e0fba4a08ed0a5c66ced3a40..16536dae04b020de43f9e13ff32c659b9e6cab0c 100644
|
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
@@ -995,5 +995,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
|
* @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
|
|
+ * @deprecated use {@link Player#setHurtDirection(float)}
|
|
+ */
|
|
+ @Deprecated
|
|
+ void setHurtDirection(float hurtDirection);
|
|
// Paper end
|
|
}
|