# Create marker
summon armor_stand ^ ^ ^.7 {Tags:["meteor","obj","init","unspellable","mrcd_bullet"],Marker:true,NoGravity:1b,Invulnerable:1b,Invisible:1b,ArmorItems:[{},{},{},{id:"minecraft:magma_block",Count:1b}],Pose:{Head:[0f,0f,180f]},DisabledSlots:4144959}

# Save speed and direction
execute as @e[tag=meteor,tag=init,limit=1] store result score @s mrcd_x0 run data get entity @s Pos[0] 1000
execute as @e[tag=meteor,tag=init,limit=1] store result score @s mrcd_y0 run data get entity @s Pos[1] 1000
execute as @e[tag=meteor,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=meteor,tag=init,limit=1] mrcd_x0 -= #var0 mrcd_system
scoreboard players operation @e[tag=meteor,tag=init,limit=1] mrcd_y0 -= #var1 mrcd_system
scoreboard players operation @e[tag=meteor,tag=init,limit=1] mrcd_z0 -= #var2 mrcd_system

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

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