aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0932-Add-Entity-Body-Yaw-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0932-Add-Entity-Body-Yaw-API.patch')
-rw-r--r--patches/server/0932-Add-Entity-Body-Yaw-API.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0932-Add-Entity-Body-Yaw-API.patch b/patches/server/0932-Add-Entity-Body-Yaw-API.patch
new file mode 100644
index 0000000000..6381bc95be
--- /dev/null
+++ b/patches/server/0932-Add-Entity-Body-Yaw-API.patch
@@ -0,0 +1,27 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: TheTuso <[email protected]>
+Date: Thu, 2 Feb 2023 16:40:41 +0100
+Subject: [PATCH] Add Entity Body Yaw API
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+index 40c80ba7fa6e0505c23e643acbc87fd03b69e208..7880631fe8a4b06f29ef69ab850129737a99521b 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+@@ -1029,6 +1029,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+ this.damageItemStack0(this.getHandle().getItemBySlot(nmsSlot), amount, nmsSlot);
+ }
+
++ @Override
++ public float getBodyYaw() {
++ return this.getHandle().getVisualRotationYInDegrees();
++ }
++
++ @Override
++ public void setBodyYaw(float bodyYaw) {
++ this.getHandle().setYBodyRot(bodyYaw);
++ }
++
+ private void damageItemStack0(net.minecraft.world.item.ItemStack nmsStack, int amount, net.minecraft.world.entity.EquipmentSlot slot) {
+ nmsStack.hurtAndBreak(amount, this.getHandle(), livingEntity -> {
+ if (slot != null) {