flush tablist on connect

This commit is contained in:
əlemi 2021-12-27 12:37:24 +01:00
parent 0d1fed30f5
commit 7b8a4eae5a

View file

@ -164,9 +164,13 @@ class Treepuncher(MinecraftClient):
def _register_handlers(self):
@self.on_disconnected()
async def on_disconnected():
async def disconnected_cb():
self.in_game = False
@self.on_connected()
async def connected_cb():
self.tablist = {}
@self.on_packet(PacketSetSlot)
async def on_set_slot(packet:PacketSetSlot):
if packet.windowId == 0: # player inventory