Difference between revisions of "Talk:Slot Data"

From wiki.vg
Jump to navigation Jump to search
(No difference)

Revision as of 06:55, 7 June 2012

Clarity on "array of slot" for Set Window Items (0x68)

Would you consider elaborating further on the presentation of the slot structure and specifically the array of slot structure? Providing a python example similar to the one in the "entity metadata format" page would be very helpful. I've struggled to get read support for this packet implemented.

The Set Window Items packet sends multiple slots after eachother, prefixed with the number of slots. Here's a pseudo-python example:
def send_set_window_items(window, items):
    send_byte(0x68)
    send_byte(window.id)
    send_short(len(items))
    for item in items:
        send_slot(item)
--Sadimusi 23:55, 6 June 2012 (MST)