MegaCrafter10

Raycasting example

May 16th, 2019 (edited)
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. run in a loop:
  2.  
  3. execute as @a[scores={click=1..}] at @s run summon minecraft:armor_stand ^ ^ ^2 {Invisible:1,Invulnerable:1,NoGravity:1,Tags:["ray"]}
  4. scoreboard players reset @a[scores={click=1..}] click
  5.  
  6. execute as @e[tag=ray,tag=!rotated] at @s run tp @s ~ ~ ~ facing entity @p
  7. tag @e[tag=ray] add rotated
  8.  
  9. execute as @e[tag=ray] at @s run tp @s ^ ^ ^-0.5
  10. execute as @e[tag=ray] at @s run particle minecraft:cloud ~ ~ ~ 0.05 0.05 0.05 0.05 20
  11. execute as @e[tag=ray] at @s unless block ~ ~ ~ air run kill @s
  12.  
  13. scoreboard players add @e[tag=ray] timer 1
  14. kill @e[tag=ray,scores={timer=100}]
Add Comment
Please, Sign In to add comment