log dimension changes
This commit is contained in:
parent
1b4430f71e
commit
9327b77c3c
1 changed files with 9 additions and 0 deletions
|
@ -9,6 +9,7 @@ from .dispatcher import Dispatcher, ConnectionState
|
|||
from .mc.mctypes import VarInt
|
||||
from .mc.packet import Packet
|
||||
from .mc.identity import Token, AuthException
|
||||
from .mc.definitions import Dimension, Difficulty, Gamemode
|
||||
from .mc import proto, encryption
|
||||
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
@ -282,6 +283,14 @@ class Client:
|
|||
keep_alive_packet = proto.play.serverbound.packet_keep_alive.PacketKeepAlive(340, keepAliveId=packet.keepAliveId)
|
||||
await self.dispatcher.write(keep_alive_packet)
|
||||
|
||||
elif isinstance(packet, proto.play.clientbound.PacketRespawn):
|
||||
self._logger.info(
|
||||
"Loading dimension: %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(
|
||||
|
|
Loading…
Reference in a new issue