#Makes the pig can move
data merge entity @n[type=pig,distance=0..0.1,tag=!launching] {NoGravity:0b,NoAI:0b}
data merge entity @n[type=pig,distance=0..0.1,tag=lobby.launcher1,tag=!launching] {Motion:[-2.0,1.0,0.0]}
data merge entity @n[type=pig,distance=0..0.1,tag=lobby.launcher2,tag=!launching] {Motion:[2.0,1.0,0.0]}

#Sfx
execute if entity @n[type=pig,distance=0..0.1,tag=!launching] run playsound minecraft:entity.firework_rocket.launch master @a ~ ~ ~ 0.8 2
execute if entity @n[type=pig,distance=0..0.1,tag=!launching] run playsound minecraft:entity.breeze.jump master @a ~ ~ ~ 0.8 0.9
execute if entity @n[type=pig,distance=0..0.1,tag=!launching] run particle minecraft:firework ~ ~1 ~ 0 0 0 0.2 10 force

tag @n[type=pig,distance=0..0.1,tag=!launching] add launching
tag @n[type=pig,distance=0..0.1,tag=!launching] add launching

#Regen pig
function subchronos:lobby/launchers/gen