function mrcd:ray_tick
scoreboard players remove pos ec_calc 1
execute if score pos ec_calc matches 0.. if entity @e[tag=mrcd_target,tag=!mrcd_target_entity,limit=1] if entity @s[tag=!mrcd_touch_edge] at @s run function items:obj/electric_charge/electrocute/check

# Remove if hit block
kill @s
