geforkt von Mirrors/Paper
Expose LivingEntity hurt direction
Dieser Commit ist enthalten in:
Ursprung
08f196719f
Commit
ec665f60d2
30
Spigot-API-Patches/Expose-LivingEntity-hurt-direction.patch
Normale Datei
30
Spigot-API-Patches/Expose-LivingEntity-hurt-direction.patch
Normale Datei
@ -0,0 +1,30 @@
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
+ */
|
||||
+ void setHurtDirection(float hurtDirection);
|
||||
// Paper end
|
||||
}
|
39
Spigot-Server-Patches/Expose-LivingEntity-hurt-direction.patch
Normale Datei
39
Spigot-Server-Patches/Expose-LivingEntity-hurt-direction.patch
Normale Datei
@ -0,0 +1,39 @@
|
||||
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/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
public int am;
|
||||
public int hurtTicks;
|
||||
public int hurtDuration;
|
||||
- public float ap;
|
||||
+ public float ap; public final float getHurtDirection() { return ap; } public final void setHurtDirection(float hurtDirection) { this.ap = hurtDirection; } // Paper - OBFHELPER
|
||||
public int deathTicks;
|
||||
public float ar;
|
||||
public float as;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) {
|
||||
getHandle().receive(((CraftItem) item).getHandle(), quantity);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public float getHurtDirection() {
|
||||
+ return getHandle().getHurtDirection();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setHurtDirection(float hurtDirection) {
|
||||
+ getHandle().setHurtDirection(hurtDirection);
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren