C02PacketUseEntity
new C02PacketUseEntity()
new C02PacketUseEntity()
Creates a new C02PacketUseEntity
object with default parameters.
Constructs a new C02PacketUseEntity
object for the specified entity and action. entity
is an instance of Entity
, and action
is a string representing the action to be performed on the entity. If you are not using the INTERACT_AT
action you can make at
null.
getAction(): String
getAction(): String
Returns the action name associated with this packet. The action is returned as a string, indicating the type of interaction with the entity.
setAction(String action): void
setAction(String action): void
Set the action for this packet, the action should be given as a String
.
getHitVec():
Vec3
getHitVec():
Vec3
Provides a Vec3
object representing the hit vector if the action involved a physical hit on the entity. This method is relevant for actions like "ATTACK" where the hit location matters.
Set the hitvector for this packet.
getEntity():
Entity
getEntity():
Entity
Gives you the entity object from the packet.
Sets the entity for this packet.
Action Types
The C02PacketUseEntity
class supports the following actions:
Last updated