minecraft-expanded-resource.../data/undeadmaelys-weapons/functions/tick.mcfunction

20 lines
1.2 KiB
Mcfunction

tellraw @a[scores={me-debugging=1..}] "undeadmaelys-weapons:tick"
# check for magic staff usage! & clear out CD if present.
execute as @a if score @s me-weap_staffCD > $0 me-weap_staffCD run scoreboard players remove @s me-weap_staffCD 1
# call for use of MAGIC MISSILE
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{CustomModelData:2201}}}] if score @s me-core_rc matches 1 at @s positioned ~ ~1.8 ~ positioned ^-0.5 ^ ^0.75 run function undeadmaelys-weapons:use/magic_missile
# call for use of FIRE BLAST
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{CustomModelData:2202}}}] if score @s me-core_rc matches 1 at @s positioned ~ ~1.8 ~ positioned ^-0.5 ^ ^0.75 run function undeadmaelys-weapons:use/fire_blast
# do MagicMissile as behaviour
execute as @e[tag=MagicMissile] at @s run function undeadmaelys-weapons:tick/magic_missile
# do FireBlast as behaviour
execute as @e[tag=FireBlast] at @s run function undeadmaelys-weapons:tick/fire_blast
# draw badass fire around the fire blast mager
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{CustomModelData:2202}}}] if entity @s[nbt={OnGround:1b}] at @s run function undeadmaelys-weapons:fire_blast_figure