2021-06-14 20:50:22 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
|
|
|
Date: Sun, 13 Dec 2020 05:32:05 +0200
|
|
|
|
Subject: [PATCH] Expose LivingEntity hurt direction
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2023-02-07 16:43:20 +01:00
|
|
|
index 8409087a5977a6ba0cd948c51f3f7ae59a041f5c..dfc5317ab5c50c240a4f0806aba6cec7852092cf 100644
|
2021-06-14 20:50:22 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2023-02-07 16:43:20 +01:00
|
|
|
@@ -913,5 +913,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
2021-06-14 20:50:22 +02:00
|
|
|
public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) {
|
|
|
|
getHandle().take(((CraftItem) item).getHandle(), quantity);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public float getHurtDirection() {
|
|
|
|
+ return getHandle().hurtDir;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setHurtDirection(float hurtDirection) {
|
|
|
|
+ getHandle().hurtDir = hurtDirection;
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
}
|