
# -> Create ship
summon item_display ~ ~ ~ \
    {\
        teleport_duration:15,\
        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Base_0","OverlyRealistic.Block.LargeShip_TempBase0"],\
        item:{id:"minecraft:dirt",count:1,components:{"minecraft:item_model":"air","minecraft:custom_model_data":{floats:[0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,]}}},\
        transformation: {left_rotation: [0.0f, 1.0f, 0.0f, 0.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [4.400f, 4.400f, 4.400f], translation: [0.0f, 9.29f, 0.0f]},\
        data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"base_0"},\
        Passengers:\
            [\
                {\
                    id:"minecraft:camel",\
                    active_effects:[{id:"invisibility",show_particles:0b,duration:-1}],\
                    Silent:1b,\
                    Invulnerable:1b,\
                    PersistenceRequired:1b,\
                    NoAI:1b,\
                    attributes:[{id:"minecraft:scale",base:3.33}],\
                    data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"base_1"},\
                    Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Base_1","OverlyRealistic.Animal.ShouldNotFlee"],\
                    Passengers:\
                        [\
                            {\
                                id:"interaction",\
                                Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Base_2"],\
                                data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"base_2"},\
                                height:-3.0f,\
                                Passengers:\
                                    [\
                                        {\
                                            id:"minecraft:happy_ghast",\
                                            active_effects:[{id:"invisibility",show_particles:0b,duration:-1}],\
                                            Silent:1b,\
                                            Invulnerable:1b,\
                                            NoAI:1b,\
                                            data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"base_4"},\
                                            Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Base_4"],\
                                            Passengers:\
                                                [\
                                                    {\
                                                        id:"minecraft:interaction",\
                                                        height:0.3f,\
                                                        width:1.5f,\
                                                        response:1b,\
                                                        data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"interaction_0"},\
                                                        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Interaction_0","OverlyRealistic.Block.Ship_Part_IsSeat"]\
                                                    },\
                                                    {\
                                                        id:"minecraft:interaction",\
                                                        height:0.3f,\
                                                        width:1.5f,\
                                                        response:1b,\
                                                        data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"interaction_1"},\
                                                        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Interaction_1","OverlyRealistic.Block.Ship_Part_IsSeat"]\
                                                    },\
                                                    {\
                                                        id:"minecraft:item_display",\
                                                        teleport_duration:15,\
                                                        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Display"],\
                                                        item:{id:"minecraft:dirt",count:1,components:{"minecraft:item_model":"overlyrealistic:blocks/ships/large_ship","minecraft:custom_model_data":{floats:[0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,]}}},\
                                                        transformation: {left_rotation: [0.0f, 1.0f, 0.0f, 0.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [4.400f, 4.400f, 4.400f], translation: [0.0f, 1.0f, 0.0f]},\
                                                        data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"display"},\
                                                        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Display"]\
                                                    },\
                                                    {\
                                                        id:"minecraft:interaction",\
                                                        height:0.3f,\
                                                        width:1.5f,\
                                                        response:1b,\
                                                        data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"interaction_3"},\
                                                        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Interaction_3","OverlyRealistic.Block.Ship_Part_IsSeat"]\
                                                    },\
                                                ]\
                                        }\
                                    ]\
                            },\
                            {\
                                id:"interaction",\
                                Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Base_3"],\
                                height:-3.0f,\
                                data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"base_3"},\
                                Passengers:\
                                    [\
                                        {\
                                            id:"minecraft:happy_ghast",\
                                            active_effects:[{id:"invisibility",show_particles:0b,duration:-1}],\
                                            Silent:1b,\
                                            Invulnerable:1b,\
                                            NoAI:1b,\
                                            data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"base_5"},\
                                            Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Base_5"],\
                                            Passengers:\
                                                [\
                                                    {\
                                                        id:"minecraft:interaction",\
                                                        height:7.7f,\
                                                        width:0.5f,\
                                                        response:1b,\
                                                        data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"interaction_4"},\
                                                        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Interaction_4","OverlyRealistic.Block.Ship_Part_IsMast"]\
                                                    },\
                                                    {\
                                                        id:"minecraft:interaction",\
                                                        height:0.3f,\
                                                        response:1b,\
                                                        data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"interaction_5"},\
                                                        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Interaction_5","OverlyRealistic.Block.Ship_Part_IsSeat"]\
                                                    },\
                                                    {\
                                                        id:"minecraft:interaction",\
                                                        height:0.3f,\
                                                        response:1b,\
                                                        data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"interaction_6"},\
                                                        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Interaction_6","OverlyRealistic.Entity.IsSpecialRidingEntity","OverlyRealistic.Block.Ship_Part_IsSeat"]\
                                                    },\
                                                    {\
                                                        id:"minecraft:interaction",\
                                                        height:0.3f,\
                                                        response:1b,\
                                                        data: {or_custom_block_id:"large_ship",or_large_ship_part_id:"interaction_7"},\
                                                        Tags:["OverlyRealistic.Block.LargeShip","OverlyRealistic.Block.LargeShipPart","OverlyRealistic.Block.Ship_Part_Interaction_7","OverlyRealistic.Block.Ship_Part_IsSeat"]\
                                                    },\
                                                ]\
                                        }\
                                    ]\
                            }\
                        ]\
                }\
            ]\
    }

# -> Move ship
execute as @n[type=item_display,tag=OverlyRealistic.Block.LargeShip_TempBase0,distance=..1] run \
    function overly_realistic:general/custom_blocks/ship_setup/create_ship/created_ship_move
