fix: I actually read wiki.vg

This commit is contained in:
əlemi 2022-07-03 17:13:25 +02:00
parent acdb60cd2f
commit f04d873d21
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E

View file

@ -67,9 +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 packet.windowId < 0: if packet.windowId == 0:
self.window_entity_id = 0 self.window_entity_id = 0
self.window_id = 0 self.window_id = 0
self.window_title = "" self.window_title = ""
elif self.window_id > 0 and packet.windowId == self.window_id: elif packet.windowId == self.window_id:
self.window_inventory[packet.slot] = packet.item self.window_inventory[packet.slot] = packet.item