
# -> Sound
playsound block.wool.place block @a ~ ~ ~ 1 1.5
playsound block.wood.place block @a ~ ~ ~ 1 1.5

# -> Remove displays
execute on passengers run \
    kill @s
execute align xyz \
    positioned ^ ^ ^5 run \
        kill @n[type=text_display,tag=OverlyRealistic.Block.ShipSetup_Text,dx=0,dy=0,dz=0]

# -> Copy rotation
execute if entity @s[tag=OverlyRealistic.Block.ShipSetup_FacingNorth] run \
    scoreboard players set #or.ship_setup_facing_direction OverlyRealistic.General.ArbitraryData 0
execute if entity @s[tag=OverlyRealistic.Block.ShipSetup_FacingEast] run \
    scoreboard players set #or.ship_setup_facing_direction OverlyRealistic.General.ArbitraryData 1
execute if entity @s[tag=OverlyRealistic.Block.ShipSetup_FacingWest] run \
    scoreboard players set #or.ship_setup_facing_direction OverlyRealistic.General.ArbitraryData 2
execute if entity @s[tag=OverlyRealistic.Block.ShipSetup_FacingSouth] run \
    scoreboard players set #or.ship_setup_facing_direction OverlyRealistic.General.ArbitraryData 3

# -> Advancement
execute on target run \
    advancement grant @s only overly_realistic:advancements/iron_age/the_new_world

# -> Rotation IDs
# 0 = North
# 1 = East
# 2 = West
# 3 = South

# -> Create ship
function overly_realistic:general/custom_blocks/ship_setup/create_ship/filter_create_ship
