hollow-cube/fix-slow-dimension-change

(cherry picked from commit 388dbf71b9)
This commit is contained in:
mworzala 2023-07-04 17:38:03 -04:00 committed by Matt Worzala
parent 37f6877b0a
commit 5413f9c98f
1 changed files with 6 additions and 0 deletions

View File

@ -723,6 +723,12 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
}
synchronizePosition(true); // So the player doesn't get stuck
sendPacket(new SpawnPositionPacket(spawnPosition, 0));
if (dimensionChange) {
instance.getWorldBorder().init(this);
sendPacket(new TimeUpdatePacket(instance.getWorldAge(), instance.getTime()));
}
if (dimensionChange) {
sendPacket(new SpawnPositionPacket(spawnPosition, 0)); // Without this the client gets stuck on loading terrain for a while