Difference between revisions of "Talk:Slot Data"

From wiki.vg
Jump to navigation Jump to search
 
 
(2 intermediate revisions by one other user not shown)
Line 10: Line 10:
 
         send_slot(item)
 
         send_slot(item)
 
:--[[User:Sadimusi|Sadimusi]] 23:55, 6 June 2012 (MST)
 
:--[[User:Sadimusi|Sadimusi]] 23:55, 6 June 2012 (MST)
 +
 +
== Rename to ItemStack ==
 +
 +
Barney said he named this Slot because it was used exclusively in the slot related packets, this is now a general data type for almost all packets that deal with items or stacks of items and as such a name of Slot may be confusing
 +
--[[User:Ammaraskar|Ammaraskar]] ([[User talk:Ammaraskar|talk]]) 21:21, 5 December 2012 (MST)
 +
 +
Hear, hear. [[User:SirCmpwn|SirCmpwn]] ([[User talk:SirCmpwn|talk]]) 10:55, 16 December 2012 (MST)

Latest revision as of 17:55, 16 December 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)

Rename to ItemStack

Barney said he named this Slot because it was used exclusively in the slot related packets, this is now a general data type for almost all packets that deal with items or stacks of items and as such a name of Slot may be confusing --Ammaraskar (talk) 21:21, 5 December 2012 (MST)

Hear, hear. SirCmpwn (talk) 10:55, 16 December 2012 (MST)