From aa6f2b03bb3678419d9bb413e2199ae0d0d451f3 Mon Sep 17 00:00:00 2001 From: alemidev Date: Sun, 3 Jul 2022 02:02:45 +0200 Subject: [PATCH] fix: add 36 slots for inventory --- src/treepuncher/game/container.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/treepuncher/game/container.py b/src/treepuncher/game/container.py index 664a0d9..c6ae5de 100644 --- a/src/treepuncher/game/container.py +++ b/src/treepuncher/game/container.py @@ -35,6 +35,7 @@ class GameContainer(Scaffold): windowId=self.window_id ) ) + # TODO move slots 0-36 to inventory? self.window_transaction_id = 0 self.window_id = 0 self.window_title = "" @@ -62,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 + 1) + self.window_inventory = [None] * (packet.slotCount + 36) # add slots for player inventory @self.on_packet(PacketSetSlot) async def on_set_slot(packet:PacketSetSlot):