📃
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
  • Getting a RaytraceResult
  • getType(): String
  • getHitVec(): Vec3
  • getEntity(): Entity
  • getBlockPos(): BlockPos
  • getSideHit(): String
  • Raytrace Result Types
  1. Objects
  2. Minecraft
  3. Util

RaytraceResult

Last updated 1 year ago

Getting a RaytraceResult

To get a RaytraceResult object you can use the namespace.

getType(): String

Returns the type of hit from the ray trace result. The type is returned as a string and can be one of the following: MISS, BLOCK, or ENTITY.

getHitVec():

Retrieves the hit vector of the ray trace result. This method returns a Vec3Wrapper object representing the precise location where the ray intersected an object.

getEntity():

Returns an EntityWrapper object if the ray trace hit an entity. If no entity was hit, the behavior of this method may vary based on implementation (could return null or an empty wrapper).

getBlockPos():

Provides the block position if the ray trace hit a block. This method returns a BlockPos object representing the location of the block that was hit.

getSideHit(): String

Returns the side of the block that was hit by the ray trace. The side is returned as a string and can be one of the following: DOWN, UP, NORTH, SOUTH, WEST, EAST, NONE.

See EnumFacing for more info on this

Raytrace Result Types

Raytrace Result Type
Description

MISS

Indicates no object was hit.

BLOCK

Indicates a block was hit.

ENTITY

Indicates an entity was hit.

world
Vec3
Entity
BlockPos