diff options
Diffstat (limited to 'patches/server/0958-Add-Entity-Body-Yaw-API.patch')
-rw-r--r-- | patches/server/0958-Add-Entity-Body-Yaw-API.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0958-Add-Entity-Body-Yaw-API.patch b/patches/server/0958-Add-Entity-Body-Yaw-API.patch new file mode 100644 index 0000000000..54c306ec99 --- /dev/null +++ b/patches/server/0958-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 f2a7a10df4c283ef3d7e44121c074156556c9cf2..2cff68a5c448c0e971d95e9264223eb943730968 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +@@ -1034,6 +1034,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) { |