diff options
author | maxcom1 <[email protected]> | 2024-03-23 22:26:17 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-23 17:26:17 -0400 |
commit | b6001403e9703cadaa6e8c8558e732b91c3c6d6e (patch) | |
tree | a8c57bbc334a8ad48d4ad2b43db335667b142bee /patches/api/0229-Expose-LivingEntity-hurt-direction.patch | |
parent | 9ec7dfcbc41c6e625de0050b6997160a75df9f44 (diff) | |
download | Paper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.tar.gz Paper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.zip |
Add methods to change entity physics (#10334)
Diffstat (limited to 'patches/api/0229-Expose-LivingEntity-hurt-direction.patch')
-rw-r--r-- | patches/api/0229-Expose-LivingEntity-hurt-direction.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/patches/api/0229-Expose-LivingEntity-hurt-direction.patch b/patches/api/0229-Expose-LivingEntity-hurt-direction.patch new file mode 100644 index 0000000000..e99a7ce6bb --- /dev/null +++ b/patches/api/0229-Expose-LivingEntity-hurt-direction.patch @@ -0,0 +1,53 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Mark Vainomaa <[email protected]> +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 94f2c3167f4ce7f5f2b4ecc067739c64af0a2508..4054d2c836342f0e4bcbd33adb13f50daea5086a 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 9d58da4686a22893455b9cc75fb8e73a87d2d06d..e9919fce380ec1d0d48b3ac706e7fd31af0be26b 100644 +--- a/src/main/java/org/bukkit/entity/LivingEntity.java ++++ b/src/main/java/org/bukkit/entity/LivingEntity.java +@@ -1075,5 +1075,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 + } |