From 6dfd1d9a7188e1571d30132b0e9fde87e60f0fbd Mon Sep 17 00:00:00 2001 From: Jake Potrebic <15055071+Machine-Maker@users.noreply.github.com> Date: Mon, 16 Aug 2021 14:46:25 -0700 Subject: [PATCH] Fix yaw on player spawn (#6409) --- patches/server/0736-Add-PlayerSetSpawnEvent.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0736-Add-PlayerSetSpawnEvent.patch b/patches/server/0736-Add-PlayerSetSpawnEvent.patch index 50fec686aa..01a415b1e6 100644 --- a/patches/server/0736-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0736-Add-PlayerSetSpawnEvent.patch @@ -18,7 +18,7 @@ index e95f2222814e104bf9194a96385737dffe2cb2b5..249ab7357aa19d87179fa4c3ae89d9d3 String string = resourceKey.location().toString(); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 926ae5fdfc8c99f4822c4d4255fd53c2999135f4..84b63753333a5656abbe92b0b04ca2f994317158 100644 +index 926ae5fdfc8c99f4822c4d4255fd53c2999135f4..c4c7399bb490f891bc83f5ba46132abaec20ec02 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1238,7 +1238,7 @@ public class ServerPlayer extends Player { @@ -55,7 +55,7 @@ index 926ae5fdfc8c99f4822c4d4255fd53c2999135f4..84b63753333a5656abbe92b0b04ca2f9 + if (event.getLocation() != null) { + dimension = event.getLocation().getWorld() != null ? ((CraftWorld) event.getLocation().getWorld()).getHandle().dimension() : dimension; + pos = net.minecraft.server.MCUtil.toBlockPosition(event.getLocation()); -+ angle = (float) event.getLocation().getY(); ++ angle = (float) event.getLocation().getYaw(); + spawnPointSet = event.isForced(); + // Paper end