particle squid_ink ~ ~.3 ~ .7 0 .7 .01 30 force
particle smoke ~ ~.1 ~ 1.2 .2 1.2 0 30 force
particle falling_dust obsidian ~ ~.5 ~ 1.2 0.3 1.2 1 30 force
particle dust 0.133 0.106 0.141 1 ~ ~.2 ~ 1.2 0.2 1.2 .1 20 force

summon area_effect_cloud ~ ~.1 ~ {Tags:["void_tear","obj","unspellable","init","mrcd_bullet"],Duration:170}
scoreboard players set @e[tag=void_tear,tag=init,sort=nearest,limit=1] countdown 170

# Save speed and direction
execute as @e[tag=void_tear,tag=init,limit=1] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000
execute as @e[tag=void_tear,tag=init,limit=1] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000
execute as @e[tag=void_tear,tag=init,limit=1] store result score @s mrcd_z0 run data get entity @s Pos[2] 1000

execute store result score #var0 mrcd_system run data get entity @s Pos[0] 1000
execute store result score #var1 mrcd_system run data get entity @s Pos[1] 1000
execute store result score #var2 mrcd_system run data get entity @s Pos[2] 1000

scoreboard players operation @e[tag=void_tear,tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system
scoreboard players operation @e[tag=void_tear,tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system
scoreboard players operation @e[tag=void_tear,tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system

execute at @s anchored eyes positioned ^ ^ ^ run tp @e[tag=void_tear,tag=init,limit=1] ~ ~ ~ ~ ~

# Clear tag
tag @e[tag=void_tear,tag=init,limit=1] remove init
