execute as @e[tag=aj.barrel.root,tag=tutorial_entity] run function animated_java:barrel/remove/this
kill @e[tag=tutorial_entity]

function htd:remove_dummy
function htd:place_tutorial
function htd:place_dummy

summon text_display 271 104.5 263 {Tags:["tutorial_entity","new"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1f,1f,1f]},text:[{"bold":true,"color":"red","text":"HEADSHOTS "},{"bold":false,"color":"white","text":"deal more damage"}],background:0}
execute as @n[type=minecraft:text_display,tag=new] at @s run function fjam:tutorial/rotate_text {r: 180}

summon text_display 247 111.25 258 {line_width:120,Tags:["tutorial_entity","new"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.75f,0.75f,0.75f]},text:[{"color":"white","text":"Please use\n"},{"bold":true,"color":"yellow","translate":"options.graphics.fabulous"}," ",{"bold":true,"color":"yellow","translate":"options.graphics"},{"color":"white","text":"\nfor the best experience"},{"color":"white","text":"\n\nCheck your "},{"color":"white","translate":"options.sounds.title"}],background:0}
execute as @n[type=minecraft:text_display,tag=new] at @s run function fjam:tutorial/rotate_text {r: 90}

summon interaction 247 110.5 258 {width:1.25f,height:0.25f,Tags:["tutorial_entity","start_interaction"]}
summon text_display 247 110.5 258 {brightness:{sky:15,block:15},background:0,Tags:["tutorial_entity","new"],transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.75f,0.75f,0.75f]},text:{"color":"aqua","translate":"chat.coordinates.tooltip"}}
execute as @n[type=minecraft:text_display,tag=new] at @s run function fjam:tutorial/rotate_text {r: 90}

summon text_display 253 104.25 258 {brightness:{sky:15,block:15},background:0,Tags:["tutorial_entity","new"],transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.75f,0.75f,0.75f]},text:[{"color":"yellow","keybind":"key.use"},{"color":"yellow","text":" to fire"}]}
execute as @n[type=minecraft:text_display,tag=new] at @s run function fjam:tutorial/rotate_text {r: 90}

summon zombie 255 103 255 {Silent:1b,DeathLootTable:"none",NoAI:1b,Health:16f,Tags:["tutorial_entity","new"],attributes:[{id:"minecraft:max_health",base:16}]}
execute as @n[type=minecraft:zombie,tag=new] at @s run function fjam:tutorial/rotate_text {r: 90}

summon zombie 255 103 261 {Silent:1b,DeathLootTable:"none",NoAI:1b,Health:16f,Tags:["tutorial_entity","new"],attributes:[{id:"minecraft:max_health",base:16}]}
execute as @n[type=minecraft:zombie,tag=new] at @s run function fjam:tutorial/rotate_text {r: 90}

execute positioned 260 103 258 rotated 90 0 run function fjam:map/game/chest/custom/spawn {func:'fjam:tutorial/ammo'}

summon text_display 261 104.5 258 {Tags:["tutorial_entity","new"],transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.75f,0.75f,0.75f]},text:[{"color":"yellow","keybind":"These contain loot\n"},{"color":"white","keybind":"key.use"},{"color":"white","text":" or "},{"color":"white","keybind":"key.attack"},{"color":"white","text":" to open"}],brightness:{sky:15,block:15},background:0}
execute as @n[type=minecraft:text_display,tag=new] at @s run function fjam:tutorial/rotate_text {r: 90}

execute positioned 280.5 101.99 266.5 as @n[tag=aj.subway.root,distance=..2] run function animated_java:subway/remove/this
execute positioned 280.5 101.99 266.5 rotated -90 0 run function animated_java:subway/summon {args:{animation: 'open_door', start_animation: true}}

summon text_display 280 104.5 264 {Tags:["tutorial_entity","new"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.5f,1.5f,1.5f]},text:[{"bold":true,"color":"red","text":"Exit Tutorial\n"},{"bold":false,"color":"white","text":"To Hub"}]}
execute as @n[type=minecraft:text_display,tag=new] at @s run function fjam:tutorial/rotate_text {r: 180}

function animated_java:vending_machine/remove/all
kill @e[tag=vending_machine_component]
execute positioned 274.5 103 258.5 rotated 90 0 run function fjam:map/game/vender/summon_ammo

execute positioned 263 103 252 rotated 0 0 run function fjam:map/game/chest/custom/spawn {func:'fjam:tutorial/cash'}
execute positioned 267 103 252 rotated 0 0 run function fjam:map/game/chest/custom/spawn {func:'fjam:tutorial/energy_core'}
execute positioned 271 103 252 rotated 0 0 run function fjam:map/game/chest/custom/spawn {func:'fjam:tutorial/gun'}

summon text_display 273 103.5 257 {Tags:["tutorial_entity","new"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.75f,0.75f,0.75f]},text:[{"color":"white","text":"Spend "},{"color":"green","text":"cash "},"at Vending Machines"],background:0}
execute as @n[type=minecraft:text_display,tag=new] at @s run function fjam:tutorial/rotate_text {r: 135}

summon text_display 279 105 248 {Tags:["tutorial_entity","new"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[3f,3f,3f]},text:{"bold":true,"color":"yellow","text":"GAMEPLAY"},background:0}
execute as @n[type=minecraft:text_display,tag=new] at @s run function fjam:tutorial/rotate_text {r: 0}

scoreboard players set #page tut.gameplay 1
function fjam:tutorial/gameplay/stage1
summon text_display 276.5 103.25 249.5 {billboard:"vertical",Tags:["tutorial_entity"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[5f,5f,5f]},text:"⏪",background:0}
summon text_display 276.65 103.25 249.5 {billboard:"vertical",Tags:["tutorial_entity"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.75f,0.75f,0.75f]},text:"Click",background:0}
summon interaction 276.5 103 249.5 {width:1f,height:2f,Tags:["tutorial_entity","left_arrow"]}
summon text_display 282.5 103.25 249.5 {billboard:"vertical",Tags:["tutorial_entity"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[5f,5f,5f]},text:"⏩",background:0}
summon text_display 282.5 103.25 249.5 {billboard:"vertical",Tags:["tutorial_entity"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.75f,0.75f,0.75f]},text:"Click",background:0}
summon interaction 282.5 103 249.5 {width:1f,height:2f,Tags:["tutorial_entity","right_arrow"]}

summon text_display 288 104 253 {Tags:["tutorial_entity","new"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1f,1f,1f]},text:[{"color":"yellow","keybind":"key.sneak"},{"color":"yellow","text":" + "},{"color":"yellow","keybind":"key.use"},{"color":"white","text":" or "},{"color":"yellow","keybind":"key.swapOffhand"},{"color":"white","text":"\nto reload your weapon"}],background:0}
execute as @n[type=minecraft:text_display,tag=new] at @s run function fjam:tutorial/rotate_text {r: 0}

summon zombie 293 103 255 {DeathLootTable:"none",NoAI:1b,Health:120f,Tags:["tutorial_entity","new"],attributes:[{id:"minecraft:max_health",base:120}]}
execute as @n[type=minecraft:zombie,tag=new] at @s run function fjam:tutorial/rotate_text {r: 90}
