[RaycastInfo] hit = dimension.raycast(startX, startY, startZ, endX, endY, endZ, maxDistance, hitLiquid, solidBlocksOnly, fullBlocksOnly)


Casts a ray in the world between two points
Traces a line in the world hoping or not to hit a block

Parameters


startX

number

The x start position

startY

number

The y start position

startZ

number

The y start position

endX

number

the x end position, where are we going

endY

number

the y end position, where are we going

endZ

number

the z end position, where are we going

[Optional] maxDistance

integer

(default: distance between start and stop) Maximum distance to travel before giving up (lower values can make no hit waste less time)

[Optional] hitLiquid

boolean

(default: false) If don't want to go through liquid make this true

[Optional] solidBlocksOnly

boolean

(default: true) Will ignore things like grass, flowers, etc that you can walk through

[Optional] fullBlocksOnly

boolean

(default: false) not certain, probably wont go through opened trapdoors and that kindof stuff

Return Value


hit

RaycastInfo

The result of the raycast