Paper/patches/api/0400-Add-Entity-Body-Yaw-API.patch
Jake Potrebic 526795bacd
Update patches to handle vineflower decompiler (#10406)
* Update patches to handle vineflower decompiler

* update patches again to handle inlined simple lambdas

* update vf again and re-apply/rebuild patches

* update patches after removal of verify-merges flag

* fix compile issue

* remove maven local

* fix some issues

* address more issues

* fix collision patch

* use paperweight release

* more fixes

* update fineflower and fix patches again

* add missing comment descriptor

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2024-04-12 12:14:06 -07:00

82 Zeilen
2.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: TheTuso <piotrekpasztor@gmail.com>
Date: Thu, 2 Feb 2023 16:40:11 +0100
Subject: [PATCH] Add Entity Body Yaw API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 2d6f7b2bf4cb23ef43a4dcbab2ecd2a7c7c2809c..0be4107270fb7fdba5c7d0e6f3964d33337f91f0 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -1026,6 +1026,43 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
* @return true if in powdered snow.
*/
boolean isInPowderedSnow();
+
+ /**
+ * Gets the x-coordinate of this entity
+ *
+ * @return x-coordinate
+ */
+ double getX();
+
+ /**
+ * Gets the y-coordinate of this entity
+ *
+ * @return y-coordinate
+ */
+ double getY();
+
+ /**
+ * Gets the z-coordinate of this entity
+ *
+ * @return z-coordinate
+ */
+ double getZ();
+
+ /**
+ * Gets this entity's pitch
+ *
+ * @see Location#getPitch()
+ * @return the entity's pitch
+ */
+ float getPitch();
+
+ /**
+ * Gets this entity's yaw
+ *
+ * @see Location#getYaw()
+ * @return the entity's yaw
+ */
+ float getYaw();
// Paper end
// Paper start - Collision API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 017a743c1445e2c859fef0ef962e656035af12bd..b8a9b56c3071d94371ab69b1a72c2e6c0692ab39 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1412,4 +1412,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);
// Paper end - ItemStack damage API
+
+ // Paper start - body yaw API
+ /**
+ * Gets entity body yaw
+ *
+ * @return entity body yaw
+ * @see Location#getYaw()
+ */
+ float getBodyYaw();
+
+ /**
+ * Sets entity body yaw
+ *
+ * @param bodyYaw new entity body yaw
+ * @see Location#setYaw(float)
+ */
+ void setBodyYaw(float bodyYaw);
+ // Paper end - body yaw API
}