public class PacketPlayInEntityInteract extends InPacket
Modifier and Type | Class and Description |
---|---|
static class |
PacketPlayInEntityInteract.InteractType |
Modifier and Type | Field and Description |
---|---|
protected Position |
location
Location of the target, sent as 3 floats x, y, z
|
protected int |
target
Entity id of the target interacted
|
protected PacketPlayInEntityInteract.InteractType |
type
Type of interation, reference InteractType
|
Constructor and Description |
---|
PacketPlayInEntityInteract() |
Modifier and Type | Method and Description |
---|---|
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
|
PacketPlayInEntityInteract.InteractType |
interactType() |
Position |
location() |
int |
target() |
protected int target
protected PacketPlayInEntityInteract.InteractType type
PacketPlayInEntityInteract.InteractType
public PacketPlayInEntityInteract()
public int id()
Packet
public Packet decode(ByteBuf buf)
Packet
buf
- the buffer storing the serialized packet datapublic int target()
public PacketPlayInEntityInteract.InteractType interactType()
public 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.