fix: maybe I'm supposed to close containers when I receive windowId < 0 ?
This commit is contained in:
parent
c2ea55c699
commit
acdb60cd2f
1 changed files with 5 additions and 1 deletions
|
@ -67,5 +67,9 @@ class GameContainer(Scaffold):
|
||||||
|
|
||||||
@self.on_packet(PacketSetSlot)
|
@self.on_packet(PacketSetSlot)
|
||||||
async def on_set_slot(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
|
self.window_inventory[packet.slot] = packet.item
|
||||||
|
|
Loading…
Reference in a new issue