How to unpack 'window_items'?
I don't have any idea how to unpack it. Does anyone know?
This is what I did for getting the players inventory, (This is only one part, your inv gets updated by like 5 methods)
In the code below I have it set up for a proxy, with the variables
self.data at index of their uuid (self.downstream.uuid) so The different players have different variables (This requires some other code I didn't include, so use different variables)
buff.save()
self.downstream.send_packet("window_items",buff.read())
buff.restore()
window = buff.read(1)
#below is state id, I know my code is bad, but it is a useless number for the most part
idc = buff.unpack_varint()
self.data[self.downstream.uuid]["slot_state"] = idc
count = buff.unpack_varint()
# below is check if inv, inventory is always window 00
if (window == b'\x00'):
for i in range(count):
self.data[self.downstream.uuid]["slot_dat"][i] = buff.unpack_slot()
buff.discard()
return()```
If you need any more help just ask (sorry if this answer is bad)
@davidawesome02 hey thanks alot! do you have discord? i'd love some more help!
Sorry for a late reply, my discord is davidawesome01#**** (I will delete this after I get a friend request from you), I forgot to check my email, because of some personal things. I can talk any time (almost) betwine 9am and 8pm.
@tcrch