forked from GeyserMC/Geyser
Send confirmation packet when spawning
Fixes some chunk bugs
This commit is contained in:
parent
13f198845c
commit
e0a1435d51
1 changed files with 4 additions and 1 deletions
|
@ -51,7 +51,7 @@ public class JavaPlayerPositionRotationTranslator extends PacketTranslator<Serve
|
|||
entity.moveAbsolute(pos, packet.getYaw(), packet.getPitch());
|
||||
|
||||
RespawnPacket respawnPacket = new RespawnPacket();
|
||||
respawnPacket.setRuntimeEntityId(0);
|
||||
respawnPacket.setRuntimeEntityId(entity.getGeyserId());
|
||||
respawnPacket.setPosition(pos);
|
||||
respawnPacket.setSpawnState(RespawnPacket.State.SERVER_READY);
|
||||
session.getUpstream().sendPacket(respawnPacket);
|
||||
|
@ -78,6 +78,9 @@ public class JavaPlayerPositionRotationTranslator extends PacketTranslator<Serve
|
|||
session.getUpstream().sendPacket(movePlayerPacket);
|
||||
session.setSpawned(true);
|
||||
|
||||
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(packet.getTeleportId());
|
||||
session.getDownstream().getSession().send(teleportConfirmPacket);
|
||||
|
||||
GeyserLogger.DEFAULT.info("Spawned player at " + packet.getX() + " " + packet.getY() + " " + packet.getZ());
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue