📃
Scripting
  • Introduction
  • Creating a script
  • Dummy API
  • Namespaces
    • breeze
    • mc
    • inventory
    • mathUtil
    • playerController
    • UIRenderer
    • world
    • render3D
    • gameSettings
  • Objects
    • Breeze
      • Settings
        • BooleanSetting
        • IntSetting
        • DoubleSetting
        • ModeSetting
        • ColorSetting
        • MinMaxSetting
        • StringSetting
        • KeyBindSetting
        • PositionSetting
      • Animation
      • Module
        • HudModule
        • RotationModule
    • Minecraft
      • Packets
        • ClientPacket
          • C00PacketKeepAlive
          • C01PacketChatMessage
          • C02PacketUseEntity
          • C03PacketPlayer
            • C04PacketPlayerPosition
            • C05PacketPlayerLook
            • C06PacketPlayerPosLook
          • C07PacketPlayerDigging
          • C08PacketBlockPlacement
          • C09PacketHeldItemChange
          • C0APacketAnimation
          • C0BPacketEntityAction
          • C0CPacketInput
          • C0DPacketCloseWindow
          • C0EPacketClickWindow
          • C0FPacketConfirmTransaction
          • C17PacketCustomPayload
        • ServerPacket
          • S00PacketKeepAlive
          • S01PacketJoinGame
          • S02PacketChat
          • S03PacketTimeUpdate
          • S04PacketEntityEquipment
          • S05PacketSpawnPosition
          • S06PacketUpdateHealth
          • S07PacketRespawn
          • S08PacketPlayerPosLook
          • S09PacketHeldItemChange
          • S0CPacketSpawnPlayer
          • S0DPacketCollectItem
          • S0EPacketSpawnObject
          • S0FPacketSpawnMob
          • S12PacketEntityVelocity
          • S13PacketDestroyEntities
          • S14PacketEntity
            • S15PacketEntityRelMove
            • S16PacketEntityLook
            • S17PacketEntityLookMove
          • S18PacketEntityTeleport
          • S19PacketEntityHeadLook
          • S19PacketEntityStatus
          • S27PacketExplosion
          • S2APacketParticles
          • S2CPacketSpawnGlobalEntity
          • S2DPacketOpenWindow
          • S2EPacketCloseWindow
          • S2FPacketSetSlot
          • S3FPacketCustomPayload
      • Util
        • Vec3
        • AxisAlingenedBB
        • RaytraceResult
        • ItemStack
        • BlockPos
      • Entity
        • LivingEntity
          • EntityPlayerSP
    • Util
      • Timer
      • KeyBind
      • Color
      • Rotation
  • Events
    • Packet send event
    • Packet receive event
    • Pre motion event
    • Motion event
    • Post motion event
    • Input event
    • Render2D event
    • Render3D event
    • Tick event
    • Render Entity event
    • World change event
    • Join server event
  • Examples
    • AntiAim
    • CPS Counter
    • Chat Spammer
    • Blink
    • Auto Sprint
  • EnumFacing
Powered by GitBook
On this page
  • new C02PacketUseEntity()
  • new C02PacketUseEntity(Entity entity, String action, Vec3 at)
  • getAction(): String
  • setAction(String action): void
  • getHitVec(): Vec3
  • setHitVec(Vec3 vec): void
  • getEntity(): Entity
  • setEntity(Entity entity): void
  • Action Types
  1. Objects
  2. Minecraft
  3. Packets
  4. ClientPacket

C02PacketUseEntity

Last updated 9 months ago

new C02PacketUseEntity()

Creates a new C02PacketUseEntity object with default parameters.

new C02PacketUseEntity( entity, String action, at)

Constructs a new C02PacketUseEntity object for the specified entity and action. entity is an instance of Entity, and 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

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

Set the action for this packet, the action should be given as a String.

getHitVec():

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.

setHitVec( vec): void

Set the hitvector for this packet.

getEntity():

Gives you the entity object from the packet.

Sets the entity for this packet.

Action Types

The C02PacketUseEntity class supports the following actions:

Action Type
Description

INTERACT

Regular right click.

ATTACK

Attack the entity.

INTERACT_AT

Interact with the entity at a specific point.

setEntity( entity): void

Entity
Entity
Vec3
Entity
action
Vec3
Vec3