public class PacketPlayInPlayerClickWindow extends InPacket
Modifier and Type | Class and Description |
---|---|
static class |
PacketPlayInPlayerClickWindow.ClickAction |
Modifier and Type | Field and Description |
---|---|
protected short |
actionNumber
A unique number for the action, used for transaction handling
|
protected int |
clickedButton
The button used in the click, dependent on action number TODO reference to wiki
|
protected Slot |
clickedItem
Item clicked
|
protected short |
clickedSlot
The clicked slot, -999 if not applicable
|
protected PacketPlayInPlayerClickWindow.ClickAction |
mode |
protected byte |
modeId
Inventory operation mode
|
protected int |
windowId
The id of the inventory which was clicked.
|
Constructor and Description |
---|
PacketPlayInPlayerClickWindow() |
Modifier and Type | Method and Description |
---|---|
short |
actionNumber() |
int |
clickedButton() |
Slot |
clickedItem() |
short |
clickedSlot() |
Packet |
decode(ByteBuf buf)
Sets the fields of the packet from the data serialized into the buffer
|
void |
handleReceived(ClientConnection connection)
Handles the packet after receiving it from a connection, is invoked by the ClientConnection that received it
|
int |
id()
Gets the ID of this packet, according to the protocol specification
|
PacketPlayInPlayerClickWindow.ClickAction |
mode() |
int |
windowId() |
protected int windowId
protected int clickedButton
protected short clickedSlot
protected short actionNumber
protected byte modeId
protected PacketPlayInPlayerClickWindow.ClickAction mode
protected Slot clickedItem
public PacketPlayInPlayerClickWindow()
public int id()
Packet
public int windowId()
public int clickedButton()
public short clickedSlot()
public short actionNumber()
public PacketPlayInPlayerClickWindow.ClickAction mode()
public Slot clickedItem()
public Packet decode(ByteBuf buf)
Packet
buf
- the buffer storing the serialized packet datapublic void handleReceived(ClientConnection connection)
Packet
Used to allow the packet to notify the ClientConnection
of packets the server receives, and make changes specific to this packet
connection
- The connection that sent the packetCopyright © 2016. All rights reserved.