also catch PacketJoinWorld

This commit is contained in:
əlemi 2021-11-12 13:46:36 +01:00
parent 1cd94a899a
commit f282ed6665

View file

@ -291,12 +291,20 @@ class Client:
elif isinstance(packet, proto.play.clientbound.PacketRespawn): elif isinstance(packet, proto.play.clientbound.PacketRespawn):
self._logger.info( self._logger.info(
"Loading dimension: %s (%s) in %s", "Reloading world: %s (%s) in %s",
Dimension(packet.dimension).name, Dimension(packet.dimension).name,
Difficulty(packet.difficulty).name, Difficulty(packet.difficulty).name,
Gamemode(packet.gamemode).name Gamemode(packet.gamemode).name
) )
elif isinstance(packet, proto.play.clientbound.PacketLogin):
self._logger.info(
"Joined world: %s (%s) in %s",
Dimension(packet.dimension).name,
Difficulty(packet.difficulty).name,
Gamemode(packet.gameMode).name
)
elif isinstance(packet, proto.play.clientbound.PacketPosition): elif isinstance(packet, proto.play.clientbound.PacketPosition):
self._logger.info("Position synchronized") self._logger.info("Position synchronized")
await self.dispatcher.write( await self.dispatcher.write(