From f282ed6665a6eaf08403143962fb662485934679 Mon Sep 17 00:00:00 2001 From: alemidev Date: Fri, 12 Nov 2021 13:46:36 +0100 Subject: [PATCH] also catch PacketJoinWorld --- aiocraft/client.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aiocraft/client.py b/aiocraft/client.py index 058c7e5..e3af021 100644 --- a/aiocraft/client.py +++ b/aiocraft/client.py @@ -291,12 +291,20 @@ class Client: elif isinstance(packet, proto.play.clientbound.PacketRespawn): self._logger.info( - "Loading dimension: %s (%s) in %s", + "Reloading world: %s (%s) in %s", Dimension(packet.dimension).name, Difficulty(packet.difficulty).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): self._logger.info("Position synchronized") await self.dispatcher.write(