diff --git a/src/treepuncher/game/container.py b/src/treepuncher/game/container.py index 4ebef0d..449b9a6 100644 --- a/src/treepuncher/game/container.py +++ b/src/treepuncher/game/container.py @@ -67,5 +67,9 @@ class GameContainer(Scaffold): @self.on_packet(PacketSetSlot) async def on_set_slot(packet:PacketSetSlot): - if self.window_id > 0 and packet.windowId == self.window_id: + if packet.windowId < 0: + self.window_entity_id = 0 + self.window_id = 0 + self.window_title = "" + elif self.window_id > 0 and packet.windowId == self.window_id: self.window_inventory[packet.slot] = packet.item