minecraft-expanded-datapack/data/undeadm-m1/functions/use/staff_magic_missile.mcfunction

11 lines
593 B
Mcfunction
Raw Permalink Normal View History

2021-02-20 11:10:44 +00:00
tellraw @a[scores={me-debugging=1..}] "undeadm-m1:use/magic_missile"
## spawn projectile
execute unless score @s me-weap_staffCD > $0 me-weap_staffCD run function undeadm-m1:entity/spawn/magic_missile
## give projectile data
# get rotation from player (so it aims the same way)
execute at @s as @e[tag=MagicMissile] if score @s me-core_uid = @p me-core_uid store result entity @s Rotation[0] float 1 run data get entity @p Rotation[0] 1
execute as @e[tag=MagicMissile] if score @s me-core_uid = @p me-core_uid store result entity @s Rotation[1] float 1 run data get entity @p Rotation[1] 1