C02PacketUseEntity
Last updated
A packet sent by the client to interact with entities.
new C02PacketUseEntity(
wrapper,action,at):C02PacketUseEntity
Creates a new C02PacketUseEntity packet
Parameters
wrapper
The entity to interact with
action
The action to perform (INTERACT, ATTACK or INTERACT_AT)
at
The hit vector for the interaction.
Returns
C02PacketUseEntity
Overrides
Packet.constructor
getAction():
UseEntityAction
Gets the action performed on the entity
Returns
The action as a string (INTERACT, ATTACK or INTERACT_AT)
getEntity():
Entity
Gets the entity this packet is interacting with
Returns
The target entity
getHitVec():
Vec3
Gets the hit vector for INTERACT_AT actions
Returns
The hit vector or null if the action is not INTERACT_AT
getPacketID():
string
Get the ID of the packet.
Returns
string
The ID of the packet.
Inherited from
setAction(
action):void
Sets the action to perform on the entity
Parameters
action
string
The new action (INTERACT, ATTACK or INTERACT_AT)
Returns
void
setEntity(
entity):void
Sets the entity this packet is interacting with
Parameters
entity
The new target entity
Returns
void
setHitVec(
vec):void
Sets the hit vector for INTERACT_AT actions
Parameters
vec
The new hit vector
Returns
void
Last updated