# RaytraceResult

Represents the result of a raytrace.

### Properties

#### blockPos

> `readonly` **blockPos**: [`BlockPos`](/api/net/minecraft/util/blockpos.md)

The block position the raytrace might have hit.

**Remarks**

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

***

#### entityHit

> `readonly` **entityHit**: [`Entity`](/api/net/minecraft/entity/entity.md)

The entity the raytrace might have hit.

**Remarks**

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

***

#### hitVec

> `readonly` **hitVec**: [`Vec3`](/api/net/minecraft/util/vec3.md)

The hit vector of the raytrace, can be null.

***

#### 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`](/api/enum_types/hittype.md)

**Returns**

[`HitType`](/api/enum_types/hittype.md)

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://scripting.breeze.rip/api/net/minecraft/util/raytraceresult.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
