Fix yaw on player spawn (#6409)

This commit is contained in:
Jake Potrebic 2021-08-16 14:46:25 -07:00 committed by GitHub
parent 934c694efd
commit 6dfd1d9a71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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