mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 16:18:02 +01:00
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
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
|
|
index 6e2e217d965ea6b8601e5ba0f8a44b817ee6654d..a0b46e05dc9c384b3dd70de00d89911c492ef493 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
@@ -855,5 +855,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|
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
|
|
}
|