mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-21 07:49:18 +00:00
add some paper pr's
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
Date: Sat, 11 Dec 2021 12:18:42 -0500
|
||||
Subject: [PATCH] Paper PR - Add Movement Direction API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index cf7ba8724ab68f6955b5ebfa1ba46c4397da32b3..1a5fe70616873ab2fc3f60b788e6315d1156562d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -979,6 +979,24 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
throw new UnsupportedOperationException("Cannot set the hurt direction on a non player");
|
||||
}
|
||||
|
||||
+ // Paper start - Movement Direction API
|
||||
+ @Override
|
||||
+ public float getSidewaysMotion() {
|
||||
+ return this.getHandle().xxa;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public float getUpwardsMotion() {
|
||||
+ return this.getHandle().yya;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public float getForwardMotion() {
|
||||
+ return this.getHandle().zza;
|
||||
+ }
|
||||
+ // Paper end - Movement Direction API
|
||||
+
|
||||
+
|
||||
public static MobType fromBukkitEntityCategory(EntityCategory entityCategory) {
|
||||
switch (entityCategory) {
|
||||
case NONE:
|
||||
Reference in New Issue
Block a user