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