# Setup messages
INIT:/tellraw @a[r=200] [{"color":"yellow",bold:true,"text":"Archimedes Air Ships"},{"color":"dark_aqua","text":" has been installed!"}]
INIT:/tellraw @a[r=200] [{"color":"red","text":"This command was created by "},{"color":"dark_red","text":"MrGarretto\n"}]
INIT:/tellraw @a[r=200] [{"color":"dark_aqua","text":"To craft an air ship control panel, throw an "},{"color":"yellow","text":"iron block"},{"color":"dark_aqua","text":" and a "},{"color":"yellow","text":"piston "},{"color":"dark_aqua","text":"on the ground together!"}]
INIT:/gamerule sendCommandFeedback false
# Make the stripes on the machine
INIT:/fill ~2 ~4 ~-2 ~11 ~4 ~2 stained_glass 15 replace stained_glass
INIT:/fill ~2 ~-1 ~-2 ~11 ~-1 ~2 stained_glass 15 replace stained_glass
# Custom Crafting
INIT:scoreboard objectives add ArSh_I dummy
scoreboard players set @e[type=Item] ArSh_I 1 {Item:{id:minecraft:iron_block},OnGround:1b}
scoreboard players set @e[type=Item] ArSh_I 2 {Item:{id:minecraft:piston},OnGround:1b}
execute @e[score_ArSh_I_min=1,score_ArSh_I=1] ~ ~ ~ execute @e[r=1,score_ArSh_I_min=2,score_ArSh_I=2] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:minecraft:spawn_egg,Count:1,tag:{EntityTag:{id:Silverfish},display:{Name:Ship_Control_Panel}}}}
execute @e[score_ArSh_I_min=1,score_ArSh_I=1] ~ ~ ~ execute @e[r=1,score_ArSh_I_min=2,score_ArSh_I=2] ~ ~ ~ particle smoke ~ ~ ~ 0 0 0 0.2 20
execute @e[score_ArSh_I_min=1,score_ArSh_I=1] ~ ~ ~ execute @e[r=1,score_ArSh_I_min=2,score_ArSh_I=2] ~ ~ ~ kill @e[type=Item,r=3,score_ArSh_I_min=1,score_ArSh_I=2]
# Placing the control panel
INIT:/scoreboard objectives add ArSh_Setup dummy
/execute @e[type=Silverfish,name=Ship_Control_Panel] ~ ~ ~ summon MinecartRideable ~ ~1 ~ {CustomName:Ship_Controls,CustomNameVisible:0,Invulnerable:1,NoGravity:1}
/execute @e[type=Silverfish,name=Ship_Control_Panel] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:ARSHCtrlPnl,Marker:1,NoGravity:1,Invisible:1}
/execute @e[type=Silverfish,name=Ship_Control_Panel] ~ ~ ~ scoreboard players set @e[type=ArmorStand,r=10,name=ARSHCtrlPnl] ArSh_Setup 12
/execute @e[type=Silverfish,name=Ship_Control_Panel] ~ ~ ~ setblock ~ ~ ~ iron_block 0 destroy
# Remove the silverfish
/tp @e[type=Silverfish,name=Ship_Control_Panel] ~ ~-500 ~
# Always keep the seat at the control panel
/execute @e[ArmorStand,name=ARSHCtrlPnl] ~ ~ ~ teleport @e[type=MinecartRideable,name=Ship_Controls,r=10,c=1] ~ ~1 ~
# Create the wall of item frames
/execute @e[score_ArSh_Setup_min=10] ~ ~ ~ fill ~-5 ~-4 ~-4 ~-5 ~4 ~4 torch 1 replace air
/execute @e[score_ArSh_Setup_min=10] ~ ~ ~ playsound block.anvil.use neutral @a[r=20]
/scoreboard players set @e[type=Item] ArSh_I 3 {Item:{id:minecraft:torch}}
/execute @e[score_ArSh_Setup_min=9,score_ArSh_Setup=10] ~ ~ ~ execute @e[score_ArSh_I_min=3,score_ArSh_I=3] ~ ~ ~ summon ItemFrame ~ ~ ~ {CustomName:ARSHScan}
/execute @e[score_ArSh_Setup_min=9,score_ArSh_Setup=10] ~ ~ ~ kill @e[score_ArSh_I_min=3,score_ArSh_I=3,r=20]
/execute @e[score_ArSh_Setup_min=9,score_ArSh_Setup=10] ~ ~ ~ fill ~-5 ~-4 ~-4 ~-5 ~4 ~4 air 0 replace torch 1
# Make the item frames scan the area
# Usable blocks
/execute @e[type=ItemFrame,name=ARSHScan] ~ ~-0.5 ~0.5 detect ~ ~ ~ planks -1 summon ArmorStand ~ ~ ~ {CustomName:ARSHBlockPlanks,NoGravity:1,Marker:1,Invisible:1}
/execute @e[type=ItemFrame,name=ARSHScan] ~ ~-0.5 ~0.5 detect ~ ~ ~ wool -1 summon ArmorStand ~ ~ ~ {CustomName:ARSHBlockWool,NoGravity:1,Marker:1,Invisible:1}
/execute @e[type=ItemFrame,name=ARSHScan] ~ ~-0.5 ~0.5 detect ~ ~ ~ fence -1 summon ArmorStand ~ ~ ~ {CustomName:ARSHBlockFence,NoGravity:1,Marker:1,Invisible:1}
/execute @e[type=ItemFrame,name=ARSHScan] ~ ~-0.5 ~0.5 detect ~ ~ ~ ladder 2 summon ArmorStand ~ ~ ~ {CustomName:ARSHBlockLdr2,NoGravity:1,Marker:1,Invisible:1}
/execute @e[type=ItemFrame,name=ARSHScan] ~ ~-0.5 ~0.5 detect ~ ~ ~ ladder 3 summon ArmorStand ~ ~ ~ {CustomName:ARSHBlockLdr3,NoGravity:1,Marker:1,Invisible:1}
/execute @e[type=ItemFrame,name=ARSHScan] ~ ~-0.5 ~0.5 detect ~ ~ ~ ladder 4 summon ArmorStand ~ ~ ~ {CustomName:ARSHBlockLdr4,NoGravity:1,Marker:1,Invisible:1}
/execute @e[type=ItemFrame,name=ARSHScan] ~ ~-0.5 ~0.5 detect ~ ~ ~ ladder 5 summon ArmorStand ~ ~ ~ {CustomName:ARSHBlockLdr5,NoGravity:1,Marker:1,Invisible:1}
# End of usable blocks
/execute @e[score_ArSh_Setup_min=1] ~ ~ ~ tp @e[type=ItemFrame,name=ARSHScan,r=20] ~1 ~ ~
/scoreboard players remove @e[score_ArSh_Setup_min=1] ArSh_Setup 1
# Remove the item frames when done scanning
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Setup=0] ~ ~ ~ kill @e[type=ItemFrame,name=ARSHScan,r=20]
# Keep track of the ship blocks
INIT:/scoreboard objectives add ArSh_IsBlock dummy
/scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl] ArSh_IsBlock 1
/scoreboard players set @e[type=ArmorStand,name=ARSHBlockPlanks] ArSh_IsBlock 1
/scoreboard players set @e[type=ArmorStand,name=ARSHBlockWool] ArSh_IsBlock 1
/scoreboard players set @e[type=ArmorStand,name=ARSHBlockFence] ArSh_IsBlock 1
/scoreboard players set @e[type=ArmorStand,name=ARSHBlockLdr2] ArSh_IsBlock 1
/scoreboard players set @e[type=ArmorStand,name=ARSHBlockLdr3] ArSh_IsBlock 1
/scoreboard players set @e[type=ArmorStand,name=ARSHBlockLdr4] ArSh_IsBlock 1
/scoreboard players set @e[type=ArmorStand,name=ARSHBlockLdr5] ArSh_IsBlock 1
# If the player breaks blocks from the airship while it isn't active
/execute @e[type=ArmorStand,name=ARSHBlockPlanks,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[type=ArmorStand,name=ARSHBlockPlanks,r=1,c=1]
/execute @e[type=ArmorStand,name=ARSHBlockWool,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[type=ArmorStand,name=ARSHBlockWool,r=1,c=1]
/execute @e[type=ArmorStand,name=ARSHBlockFence,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[type=ArmorStand,name=ARSHBlockFence,r=1,c=1]
/execute @e[type=ArmorStand,name=ARSHBlockLdr2,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[type=ArmorStand,name=ARSHBlockLdr2,r=1,c=1]
/execute @e[type=ArmorStand,name=ARSHBlockLdr3,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[type=ArmorStand,name=ARSHBlockLdr3,r=1,c=1]
/execute @e[type=ArmorStand,name=ARSHBlockLdr4,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[type=ArmorStand,name=ARSHBlockLdr4,r=1,c=1]
/execute @e[type=ArmorStand,name=ARSHBlockLdr5,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[type=ArmorStand,name=ARSHBlockLdr5,r=1,c=1]
# To destroy the control panel and revert the ship blocks
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[type=Item,r=3]
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Active=0] ~-5 ~-5 ~-5 detect ~5 ~5 ~5 air 0 kill @e[type=ArmorStand,name=!ARSHCtrlPnl,score_ArSh_IsBlock_min=1,dx=9,dy=9,dz=9]
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 summon Item ~ ~1.2 ~ {CustomName:ARSHCtrlItem,Item:{id:minecraft:spawn_egg,Damage:60,Count:1,tag:{display:{Name:Ship_Control_Panel}}}}
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Active=0] ~ ~ ~ detect ~ ~ ~ air 0 tp @e[r=3,type=!Player,name=!ARSHCtrlItem] ~ ~-1000 ~
# Find when players are riding the horse
INIT:/scoreboard objectives add ArSh_Active dummy
INIT:/scoreboard objectives add ArSh_MkSld dummy
/scoreboard players set @a[score_ArSh_Active_min=1] ArSh_MkSld 1
/scoreboard players set @a ArSh_Active 0
/scoreboard players set @a ArSh_Active 1 {RootVehicle:{Entity:{id:MinecartRideable,CustomName:Ship_Controls}}}
/scoreboard players reset @a[score_ArSh_Active_min=1] ArSh_MkSld
scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl] ArSh_Active 0
/execute @a[score_ArSh_Active_min=1] ~ ~ ~ scoreboard players set @e[type=ArmorStand,c=1,r=6,name=ARSHCtrlPnl] ArSh_Active 1
# Turn the nearby blocks into fallingsand blocks
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Active_min=1,score_ArSh_Active=1] ~-4 ~-4 ~-4 scoreboard players set @e[score_ArSh_IsBlock_min=1,dx=9,dy=9,dz=9] ArSh_Active 1
# Remove solid blocks upon becoming active
/execute @e[name=ARSHCtrlPnl,score_ArSh_Active_min=1] ~ ~ ~ setblock ~ ~ ~ air 0 replace iron_block
/execute @e[name=ARSHBlockPlanks,score_ArSh_Active_min=1] ~ ~ ~ setblock ~ ~ ~ air 0 replace planks
/execute @e[name=ARSHBlockWool,score_ArSh_Active_min=1] ~ ~ ~ setblock ~ ~ ~ air 0 replace wool
/execute @e[name=ARSHBlockFence,score_ArSh_Active_min=1] ~ ~ ~ setblock ~ ~ ~ air 0 replace fence
# Don't let ladder items fall on the ground
/scoreboard players set @e[type=Item] ArSh_I 3 {Item:{id:minecraft:ladder}}
/execute @e[score_ArSh_Active_min=1] ~ ~ ~ kill @e[type=Item,score_ArSh_I_min=3,score_ArSh_I=3,r=3]
# Always keep fallingsand blocks once active
# /kill @e[type=FallingSand,name=ARSHFallBlock]
INIT:/scoreboard objectives add ArSh_AcCt dummy
/scoreboard players add @e[score_ArSh_Active_min=1] ArSh_AcCt 0
/scoreboard players add @e[score_ArSh_Active_min=1,score_ArSh_AcCt=5] ArSh_AcCt 1
/scoreboard players set @e[score_ArSh_Active=0] ArSh_AcCt 0
/execute @e[name=ARSHCtrlPnl,score_ArSh_Active_min=1,score_ArSh_AcCt_min=4,score_ArSh_AcCt=4] ~ ~ ~ summon ArmorStand ~ ~-1.46 ~ {CustomName:ARSHFallBlock,NoGravity:1,Invisible:1,Passengers:[{id:"FallingSand",CustomName:ARSHFallBlock,Block:iron_block,DropItem:0b,Time:1}]}
/execute @e[name=ARSHBlockPlanks,score_ArSh_Active_min=1,score_ArSh_AcCt_min=4,score_ArSh_AcCt=4] ~ ~ ~ summon ArmorStand ~ ~-1.46 ~ {CustomName:ARSHFallBlock,NoGravity:1,Invisible:1,Passengers:[{id:"FallingSand",CustomName:ARSHFallBlock,Block:planks,DropItem:0b,Time:1}]}
/execute @e[name=ARSHBlockWool,score_ArSh_Active_min=1,score_ArSh_AcCt_min=4,score_ArSh_AcCt=4] ~ ~ ~ summon ArmorStand ~ ~-1.46 ~ {CustomName:ARSHFallBlock,NoGravity:1,Invisible:1,Passengers:[{id:"FallingSand",CustomName:ARSHFallBlock,Block:wool,DropItem:0b,Time:1}]}
/execute @e[name=ARSHBlockFence,score_ArSh_Active_min=1,score_ArSh_AcCt_min=4,score_ArSh_AcCt=4] ~ ~ ~ summon ArmorStand ~ ~-1.46 ~ {CustomName:ARSHFallBlock,NoGravity:1,Invisible:1,Passengers:[{id:"FallingSand",CustomName:ARSHFallBlock,Block:fence,DropItem:0b,Time:1}]}
/execute @e[name=ARSHBlockLdr2,score_ArSh_Active_min=1,score_ArSh_AcCt_min=4,score_ArSh_AcCt=4] ~ ~ ~ summon ArmorStand ~ ~-1.46 ~ {CustomName:ARSHFallBlock,NoGravity:1,Invisible:1,Passengers:[{id:"FallingSand",CustomName:ARSHFallBlock,Block:ladder,DropItem:0b,Data:2,Time:1}]}
/execute @e[name=ARSHBlockLdr3,score_ArSh_Active_min=1,score_ArSh_AcCt_min=4,score_ArSh_AcCt=4] ~ ~ ~ summon ArmorStand ~ ~-1.46 ~ {CustomName:ARSHFallBlock,NoGravity:1,Invisible:1,Passengers:[{id:"FallingSand",CustomName:ARSHFallBlock,Block:ladder,DropItem:0b,Data:3,Time:1}]}
/execute @e[name=ARSHBlockLdr4,score_ArSh_Active_min=1,score_ArSh_AcCt_min=4,score_ArSh_AcCt=4] ~ ~ ~ summon ArmorStand ~ ~-1.46 ~ {CustomName:ARSHFallBlock,NoGravity:1,Invisible:1,Passengers:[{id:"FallingSand",CustomName:ARSHFallBlock,Block:ladder,DropItem:0b,Data:4,Time:1}]}
/execute @e[name=ARSHBlockLdr5,score_ArSh_Active_min=1,score_ArSh_AcCt_min=4,score_ArSh_AcCt=4] ~ ~ ~ summon ArmorStand ~ ~-1.46 ~ {CustomName:ARSHFallBlock,NoGravity:1,Invisible:1,Passengers:[{id:"FallingSand",CustomName:ARSHFallBlock,Block:ladder,DropItem:0b,Data:5,Time:1}]}
/execute @e[type=ArmorStand,score_ArSh_Active_min=1,score_ArSh_IsBlock_min=1] ~ ~ ~ setblock ~ ~-1 ~ air
# Making the fallingsand blocks become solid again
/execute @a[score_ArSh_MkSld_min=1] ~ ~ ~ scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl,c=1,r=5] ArSh_MkSld 3
/execute @e[type=ArmorStand,score_ArSh_MkSld_min=3] ~-4 ~-4 ~-4 scoreboard players set @e[score_ArSh_IsBlock_min=1,dx=9,dy=9,dz=9] ArSh_Active 0
/execute @e[type=ArmorStand,score_ArSh_Active=0] ~ ~ ~ kill @e[name=ARSHFallBlock,r=3]
/execute @e[name=ARSHBlockPlanks,score_ArSh_Active=0] ~ ~ ~ setblock ~ ~ ~ planks
/execute @e[name=ARSHBlockWool,score_ArSh_Active=0] ~ ~ ~ setblock ~ ~ ~ wool
/execute @e[name=ARSHBlockFence,score_ArSh_Active=0] ~ ~ ~ setblock ~ ~ ~ fence
/execute @e[name=ARSHBlockLdr2,score_ArSh_Active=0] ~ ~ ~ setblock ~ ~ ~ ladder 2
/execute @e[name=ARSHBlockLdr3,score_ArSh_Active=0] ~ ~ ~ setblock ~ ~ ~ ladder 3
/execute @e[name=ARSHBlockLdr4,score_ArSh_Active=0] ~ ~ ~ setblock ~ ~ ~ ladder 4
/execute @e[name=ARSHBlockLdr5,score_ArSh_Active=0] ~ ~ ~ setblock ~ ~ ~ ladder 5
/execute @e[name=ARSHCtrlPnl,score_ArSh_Active=0] ~ ~ ~ setblock ~ ~ ~ iron_block
/execute @e[type=ArmorStand,score_ArSh_MkSld_min=1,score_ArSh_MkSld=1] ~ ~ ~ fill ~-4 ~-4 ~-4 ~4 ~4 ~4 sponge 1 replace air
/execute @e[type=ArmorStand,score_ArSh_MkSld_min=1,score_ArSh_MkSld=1] ~ ~ ~ fill ~-4 ~-4 ~-4 ~4 ~4 ~4 air 0 replace sponge 1
# Destroying the ship controls
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Active=0] ~ ~ ~ detect ~ ~-1 ~ air 0 setblock ~ ~ ~ air
# Controls tellraw messages
INIT:/scoreboard objectives add ArSh_Anchor dummy
INIT:/scoreboard objectives add ArSh_Move dummy
INIT:/scoreboard objectives add ArSh_Ready dummy
/scoreboard players add @e[type=ArmorStand,name=ARSHCtrlPnl] ArSh_Anchor 0
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor=0] ~ ~ ~ tellraw @p[score_ArSh_Active_min=1,r=5] [{"text":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n"},{"text":" "},{"color":"dark_aqua","underlined":true,"text":"Ship Controls"},{"text":"\n\n"},{"text":" [Ascend]","color":"yellow","clickEvent":{"action":"run_command","value":"/scoreboard players set @e[name=ARSHCtrlPnl,c=1,r=5,score_ArSh_Ready_min=1] ArSh_Move 10"}},{"text":" [Descend]","color":"yellow","clickEvent":{"action":"run_command","value":"/scoreboard players set @e[name=ARSHCtrlPnl,c=1,r=5,score_ArSh_Ready_min=1] ArSh_Move -10"}},{"text":" [Unanchor]","color":"green","clickEvent":{"action":"run_command","value":"/scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl,c=1,r=5] ArSh_Anchor 2"}},{"text":"\n\n"}]
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1] ~ ~ ~ tellraw @p[score_ArSh_Active_min=1,r=5] [{"text":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"},{"text":" "},{"color":"dark_aqua","underlined":true,"text":"Ship Controls"},{"text":"\n\n"},{"text":" [Ascend]","color":"yellow","clickEvent":{"action":"run_command","value":"/scoreboard players set @e[name=ARSHCtrlPnl,c=1,r=5,score_ArSh_Ready_min=1] ArSh_Move 10"}},{"text":" [Descend]","color":"yellow","clickEvent":{"action":"run_command","value":"/scoreboard players set @e[name=ARSHCtrlPnl,c=1,r=5,score_ArSh_Ready_min=1] ArSh_Move -10"}},{"text":" [Drop Anchor]","color":"green","clickEvent":{"action":"run_command","value":"/scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl,c=1,r=5] ArSh_Anchor 3"}},{"text":"\n\n"}]
# Directional movement
execute @a[rym=-180,ry=-158] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~0.039874 ~0 ~-0.195985
execute @a[rym=-157,ry=-135] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~0.113281 ~0 ~-0.164825
execute @a[rym=-134,ry=-112] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~0.168678 ~0 ~-0.107460
execute @a[rym=-111,ry=-89] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~0.197257 ~0 ~-0.033010
execute @a[rym=-88,ry=-66] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~0.194474 ~0 ~0.046689
execute @a[rym=-65,ry=-43] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~0.160771 ~0 ~0.118965
execute @a[rym=-42,ry=-20] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~0.101508 ~0 ~0.172326
execute @a[rym=-19,ry=3] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~0.026105 ~0 ~0.198289
execute @a[rym=4,ry=26] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~-0.053448 ~0 ~0.192726
execute @a[rym=27,ry=49] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~-0.124503 ~0 ~0.156522
execute @a[rym=50,ry=72] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~-0.175763 ~0 ~0.095432
execute @a[rym=73,ry=95] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~-0.199079 ~0 ~0.019169
execute @a[rym=96,ry=118] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~-0.190743 ~0 ~-0.060141
execute @a[rym=119,ry=141] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~-0.152081 ~0 ~-0.129890
execute @a[rym=142,ry=164] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~-0.089240 ~0 ~-0.178987
execute @a[rym=165,ry=187] ~ ~ ~ execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=1,score_ArSh_Active_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~-0.012210 ~0 ~-0.199627
# Ship movement sound
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Active_min=1,score_ArSh_Anchor_min=1] ~ ~ ~ playsound block.fire.extinguish neutral @a[r=20] ~ ~ ~ 0.01 0
# Ascending and descending
/scoreboard players add @e[type=ArmorStand,name=ARSHCtrlPnl] ArSh_Move 0
/execute @e[score_ArSh_Move=-1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~ ~-0.1 ~
/execute @e[score_ArSh_Move_min=1] ~-6 ~-6 ~-6 tp @e[type=ArmorStand,dx=11,dy=11,dz=11] ~ ~0.1 ~
/scoreboard players remove @e[score_ArSh_Move_min=1] ArSh_Move 1
/scoreboard players add @e[score_ArSh_Move=-1] ArSh_Move 1
/scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl] ArSh_Ready 0
/scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Move_min=0,score_ArSh_Move=0] ArSh_Ready 1
# Anchor audio
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=2,score_ArSh_Anchor=2] ~ ~ ~ playsound entity.enderdragon.flap neutral @a[r=20]
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=3,score_ArSh_Anchor=3] ~ ~ ~ playsound block.anvil.land neutral @a[r=20]
/scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=2,score_ArSh_Anchor=2] ArSh_Anchor 1
/scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor_min=3,score_ArSh_Anchor=3] ArSh_Anchor 0
# Anchor visuals
/scoreboard players set @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Active=0] ArSh_Anchor 0
# When ArSh_Anchor is set to 0 on ARSHCtrlPnl, it means that the anchor is down
/execute @e[type=ArmorStand,name=ARSHCtrlPnl,score_ArSh_Anchor=0] ~ ~ ~ /particle cloud ~ ~-16 ~ 0 5 0 0.01 100 force
# Final resets
/scoreboard players remove @e[score_ArSh_MkSld_min=1] ArSh_MkSld 1
# Don't let the fallingsand break
/entitydata @e[type=FallingSand,name=ARSHFallBlock] {Time:1}