mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-20 23:39:16 +00:00
add some paper pr's
This commit is contained in:
55
patches/api/0004-Paper-PR-Add-Movement-Direction-API.patch
Normal file
55
patches/api/0004-Paper-PR-Add-Movement-Direction-API.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
Date: Sat, 11 Dec 2021 12:18:47 -0500
|
||||
Subject: [PATCH] Paper PR - Add Movement Direction API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 654dc0c6d98b29cf45d3826aece374726e3e9802..a1dfe9e1509a1b852e991e29c720fdfad596a2f8 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1149,6 +1149,44 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @see Location#setYaw(float)
|
||||
*/
|
||||
void setBodyYaw(float bodyYaw);
|
||||
+
|
||||
+ /**
|
||||
+ * This number represents how much the entity is trying to move sideways.
|
||||
+ * <p>
|
||||
+ * This number is ranges from -1 to 1,
|
||||
+ * where positive 1 represents the left and -1 represents the right.
|
||||
+ * <p>
|
||||
+ * Note that for {@link Player} entities only update this value when riding an entity, which may cause it
|
||||
+ * to be inaccurate when dismounted.
|
||||
+ *
|
||||
+ * @return direction repesented as -1 to 1
|
||||
+ */
|
||||
+ float getSidewaysMotion();
|
||||
+
|
||||
+ /**
|
||||
+ * This number represents how much the entity is trying to move
|
||||
+ * in the upwards direction.
|
||||
+ * <p>
|
||||
+ * This number is ranges from -1 to 1,
|
||||
+ * where positive 1 represents the up and -1 represents the down.
|
||||
+ * <p>
|
||||
+ * Note that for {@link Player} entities this value is never updated.
|
||||
+ *
|
||||
+ * @return direction repesented as -1 to 1
|
||||
+ */
|
||||
+ float getUpwardsMotion();
|
||||
+
|
||||
+ /**
|
||||
+ * This number represents how much the entity is trying to move forward.
|
||||
+ * <p>
|
||||
+ * This number is ranges from -1 to 1,
|
||||
+ * where positive 1 represents the up and -1 represents the down.
|
||||
+ * <p>
|
||||
+ * Note that for {@link Player} entities only update this value when riding an entity, so it may be inaccurate when dismounted.
|
||||
+ *
|
||||
+ * @return direction repesented as -1 to 1
|
||||
+ */
|
||||
+ float getForwardMotion();
|
||||
// Paper end
|
||||
|
||||
// Purpur start
|
||||
Reference in New Issue
Block a user