From 0dec8bfc063fe4656d22776dc9089e2c052729f4 Mon Sep 17 00:00:00 2001 From: alemidev Date: Sat, 11 Dec 2021 05:59:16 +0100 Subject: [PATCH] more proper join game sequence --- treepuncher/treepuncher.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/treepuncher/treepuncher.py b/treepuncher/treepuncher.py index 763fba5..7e3532b 100644 --- a/treepuncher/treepuncher.py +++ b/treepuncher/treepuncher.py @@ -16,7 +16,7 @@ from aiocraft.mc.proto.play.clientbound import ( PacketRespawn, PacketLogin, PacketPosition, PacketUpdateHealth, PacketExperience, PacketAbilities, PacketChat as PacketChatMessage ) -from aiocraft.mc.proto.play.serverbound import PacketTeleportConfirm, PacketClientCommand, PacketChat +from aiocraft.mc.proto.play.serverbound import PacketTeleportConfirm, PacketClientCommand, PacketSettings, PacketChat from .events import ChatEvent from .events.chat import MessageType @@ -177,6 +177,18 @@ class Treepuncher(MinecraftClient): self.gamemode.name ) self.run_callbacks(TreepuncherEvents.IN_GAME) + await self.write( + PacketSettings( + self.dispatcher.proto, + locale="en_US", + viewDistance=4, + chatFlags=0, + chatColors=True, + skinParts=0xFF, + mainHand=0, + ) + ) + await self.write(PacketClientCommand(self.dispatcher.proto, actionId=0)) @self.on_packet(PacketPosition) async def player_rubberband_cb(packet:PacketPosition):