Advertisement
GalSergey

tp from score | old

Aug 7th, 2023
1,467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.72 KB | None | 0 0
  1. # load function
  2. scoreboard objectives add Pos dummy
  3. data merge storage example:data {score:{Pos:[0d,0d,0d]}}
  4.  
  5. # tick function
  6. execute as @a run function example:old/init
  7.  
  8. # function example:old/init
  9. tag @s add this
  10. execute store result storage example:data score.Pos[0] double 1 run scoreboard players get X Pos
  11. execute store result storage example:data score.Pos[1] double 1 run scoreboard players get Y Pos
  12. execute store result storage example:data score.Pos[2] double 1 run scoreboard players get Z Pos
  13. execute summon area_effect_cloud run function example:old/tp
  14. tag @s remove this
  15.  
  16. # function example:old/tp
  17. data modify entity @s Pos set from storage example:data score.Pos
  18. execute at @s as @a[tag=this] run tp @s ~ ~ ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement