
# -> Reset setup interaction ID
scoreboard players set #or.ship_setup_interaction_id OverlyRealistic.General.ArbitraryData 0

# -> Operate on player
execute on target run \
    function overly_realistic:general/custom_blocks/ship_setup/player_interact_with_setup

# --> Interaction IDs

# -> ID sections:
# 1-17 = wood
# 18 = sail
# 19-24 = seats

# -> Place ship section
execute if score #or.ship_setup_interaction_id OverlyRealistic.General.ArbitraryData matches 1 \
    unless score @s OverlyRealistic.General.ArbitraryData matches 17.. run \
        function overly_realistic:general/custom_blocks/ship_setup/interaction/int_place_ship_section

# -> Place ship sail
execute if score #or.ship_setup_interaction_id OverlyRealistic.General.ArbitraryData matches 2 \
    if score @s OverlyRealistic.General.ArbitraryData matches 17 run \
        function overly_realistic:general/custom_blocks/ship_setup/interaction/int_place_ship_section

# -> Place ship seat
execute if score #or.ship_setup_interaction_id OverlyRealistic.General.ArbitraryData matches 3 \
    unless score @s OverlyRealistic.General.ArbitraryData matches ..17 run \
        function overly_realistic:general/custom_blocks/ship_setup/interaction/int_place_ship_section
