- check_circle Functions
Published Mar 18th, 2021, 3/18/21 3:06 am
- 2,886 views, 9 today
- 306 downloads, 1 today
0
Raycasting Framework.
Inside each function file comments are shown to help you edit and understand the basics of raycasting.
The function file ray:ray_hit will be run if a block is detected/hit.
Inside the ray:loop_ray function, you can edit the maximum range of the ray, the length between points of the ray (default 0.2).
Everything in this datapack is made to be used by others.
You could for example make a custom lightning wand, where when you click with a specific item it raycasts and summons lightning.
because the ray_hit function is run as the player, at the ray collision location we can summon lightning if ourselves are holding a specific item.
Inside each function file comments are shown to help you edit and understand the basics of raycasting.
The function file ray:ray_hit will be run if a block is detected/hit.
Inside the ray:loop_ray function, you can edit the maximum range of the ray, the length between points of the ray (default 0.2).
Everything in this datapack is made to be used by others.
You could for example make a custom lightning wand, where when you click with a specific item it raycasts and summons lightning.
Lightning Wand - (inside the ray_hit function)
execute if entity @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick", Count:1b, tag:{lightning_wand:1b}}}] run summon lightning_bolt ~ ~ ~
because the ray_hit function is run as the player, at the ray collision location we can summon lightning if ourselves are holding a specific item.
Compatibility | Minecraft 1.16 |
Tags |
5025412
119
Create an account or sign in to comment.