RaytraceResult

Represents the result of a raytrace.

Properties

blockPos

readonly blockPos: BlockPos

The block position the raytrace might have hit.

Remarks

May be null if the raytrace didn't hit a block.


entityHit

readonly entityHit: Entity

The entity the raytrace might have hit.

Remarks

May be null if the raytrace didn't hit an entity.


sideHit

readonly sideHit: string

The side of the block the raytrace might have hit. Will be a EnumFacing.

Remarks

May be null if the raytrace didn't hit a block.

Methods

getHitType()

getHitType(): HitType

Returns

HitType

The type of hit that was made. One of: BLOCK, ENTITY, MISS.

Last updated