From c2ea55c699c6f80e4a8c5b6eab963f7c42c1c4b4 Mon Sep 17 00:00:00 2001 From: alemidev Date: Sun, 3 Jul 2022 16:54:40 +0200 Subject: [PATCH] fix: oversize container slots because minecraft is dumb --- src/treepuncher/game/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/treepuncher/game/container.py b/src/treepuncher/game/container.py index c6ae5de..4ebef0d 100644 --- a/src/treepuncher/game/container.py +++ b/src/treepuncher/game/container.py @@ -63,7 +63,7 @@ class GameContainer(Scaffold): self.window_title = packet.windowTitle self.window_inventory_type = packet.inventoryType self.window_entity_id = packet.entityId if packet.inventoryType == "EntityHorse" and hasattr(packet, "entityId") else None - self.window_inventory = [None] * (packet.slotCount + 36) # add slots for player inventory + self.window_inventory = [None] * ((packet.slotCount or 36) + 36) # add slots for player inventory @self.on_packet(PacketSetSlot) async def on_set_slot(packet:PacketSetSlot):