Raycasting Customizer

Generates a data pack using vdvman1's raycasting functions.

Use the following command to activate the raycast:

execute as <shooter> at @s anchored eyes positioned ^ ^ ^ anchored feet run function vdv_raycast:start_ray

Raycasting method

Maximum distance in blocks that the raycast will travel.

Customization options

Commands

Tip: use the following command if you want to force a successful raycast to continue: scoreboard players set #hit vdvcasttemp 0
Tip: select the entity that performed the raycast by looking for an entity with the vdvray tag. For example: @a[tag=vdvray,limit=1]

Specify the commands you wish to run when raycasting succeeds.

If detecting an entity, the entity that was found can be targeted with @s while the execution position is at the hit position. The position of the hit entity can be targeted with execute at @s.

Tip: use the following command if you want to force a successful raycast to continue: scoreboard players set #hit vdvcasttemp 0
Tip: select the entity that performed the raycast by looking for an entity with the vdvray tag. For example: @a[tag=vdvray,limit=1]

Specify the commands you wish to run when the entity raycasting succeeds.

The entity that was found can be targeted with @s while the execution position is at the hit position. The position of the hit entity can be targeted with execute at @s.


Specify the commands you wish to run when the block raycasting succeeds.

Tip: select the entity that performed the raycast by looking for an entity with the vdvray tag. For example: @a[tag=vdvray,limit=1]

Specify the optional commands to run at each step of the raycast. This can be used to, for example, create a line of particles.


Specify the optional commands you wish to run when the raycast finishes without succeeding.