aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0053-Fix-spawn-location-event-changing-location.patch
blob: fc62bdeb0248a97daba70bea04c07c308622924c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Steve Anton <anxuiz.nx@gmail.com>
Date: Thu, 3 Mar 2016 00:09:38 -0600
Subject: [PATCH] Fix spawn location event changing location

== AT ==
public net.minecraft.world.entity.Entity setRot(FF)V

diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 0166d594cb8b4aeabc1fcdb850cd3305216b680a..d12b75f0080a763799fd77b1a35a4ee7779cf4e5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -233,7 +233,10 @@ public abstract class PlayerList {
 
         player.spawnIn(worldserver1);
         player.gameMode.setLevel((ServerLevel) player.level());
-        player.absMoveTo(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
+        // Paper start - set raw so we aren't fully joined to the world (not added to chunk or world)
+        player.setPosRaw(loc.getX(), loc.getY(), loc.getZ());
+        player.setRot(loc.getYaw(), loc.getPitch());
+        // Paper end - set raw so we aren't fully joined to the world
         // Spigot end
 
         // CraftBukkit - Moved message to after join