tag @e[name=KyuPatch,type=armor_stand] add PatchOnePointFive
#tellraw @a ["",{"text":"Patch 1.5.0 has been installed!","color":"gold"},{"text":"","color":"red"}]
execute as @e[tag=CurrentPatch] run data merge entity @s[tag=CurrentPatch] {CustomName:"\"Patch 1.5.0\"",Tags:["CurrentPatch"],NoGravity:1,Invisible:1b,Silent:1b,Invulnerable:1}



#execute as @e[type=armor_stand,name=DayQ] run function zzzzdonotuse:difficulty/normaldifficulty





setblock 999982 128 999980 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/lanterns/lanternstimer",TrackOutput:0} destroy
setblock 999982 129 999980 repeating_command_block[facing=up]{auto:0b,Command:"execute as @e[type=marker,limit=1,sort=nearest,distance=..2,tag=LanternEventTypingText] run function zzzzdonotuse:randomevent/lanterns/lanterneventtext",TrackOutput:0} destroy

setblock 999982 128 999979 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/cacklingcreepers/cacklingcreeperstimer",TrackOutput:0} destroy
setblock 999982 128 999978 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/glitchinghour/glitchinghourtimer",TrackOutput:0} destroy
setblock 999982 128 999977 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/paratroopers/paratrooperstimer",TrackOutput:0} destroy
setblock 999982 128 999976 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/superlucky/superluckytimer",TrackOutput:0} destroy
setblock 999982 128 999975 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/mealsonwheels/mealsonwheelstimer",TrackOutput:0} destroy
setblock 999982 128 999974 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/hottothetouch/hottothetouchtimer",TrackOutput:0} destroy
setblock 999982 128 999973 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/magnetmania/magnetmaniatimer",TrackOutput:0} destroy
setblock 999982 128 999972 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/thunderstruck/thunderstrucktimer",TrackOutput:0} destroy
setblock 999982 128 999971 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:7sec/hardmodespecific/skeletonfireballs",TrackOutput:0} destroy

setblock 999981 122 999971 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:structures/smallgrave/smallgravetimer",TrackOutput:0} destroy

setblock 999976 123 999971 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:nethercorruption/nethercorruption",TrackOutput:0} destroy

#redo meteor storm
setblock 999982 122 999980 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:randomevent/meteorstorm/meteorstormtimer",TrackOutput:0} destroy

#cool
setblock 999977 123 999971 repeating_command_block[facing=up]{auto:0b,Command:"execute as @a[tag=CoolBugFacts] run function zzzzdonotuse:mobspawners/spawnerstuff/pyramid/coolbugfactsstimer",TrackOutput:0} destroy

#flaregun
setblock 999978 123 999971 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:weapons/flaregun/flaregun",TrackOutput:0} destroy


#fix RDT
#execute in overworld run data modify block 999984 130 999981 Command set value "execute at @e[limit=1,name=SpawnerSheep,sort=nearest] run summon spawner_minecart ~2 ~1.5 ~ {Delay: 1,MinSpawnDelay: 1,MaxSpawndelay: 1,SpawnCount: 1,SpawnRange:0,RequiredPlayerRange:1032767,SpawnData:{entity:{id:\"minecraft:item\",Item:{id:air,Count:1}}},SpawnPotentials: [{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:gold_ingot\",Damage:0,Count:1}}},weight:100},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:gold_block\",Damage:0,Count:1}}},weight:20},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:gold_ingot\",Damage:0,Count:3}}},weight:110},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:iron_block\",Damage:0,Count:1}}},weight:110},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:diamond\",Damage:0,Count:2}}},weight:30},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:diamond_block\",Damage:0,Count:1}}},weight:5},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:golden_apple\",Damage:0,Count:1}}},weight:40},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:enchanted_golden_apple\",Damage:0,Count:1}}},weight:2},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:tnt\",Damage:0,Count:5}}},weight:70},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:golden_sword\",Damage:0,Count:1,tag:{Unbreakable:1,Enchantments:[{id:\"minecraft:sharpness\",lvl:9},{id:\"minecraft:smite\",lvl:6},{id:\"minecraft:bane_of_arthropods\",lvl:6},{id:\"minecraft:looting\",lvl:4},{id:\"minecraft:fire_aspect\",lvl:5}]}}}},weight:1},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:glass\",Damage:0,Count:1,tag:{display:{Lore:[\"\\\"healpud\\\"\"]}}}}},weight:30},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:sand\",Damage:0,Count:1,tag:{display:{Lore:[\"\\\"abspud\\\"\"]}}}}},weight:54},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:torch\",Damage:0,Count:1,tag:{display:{Lore:[\"\\\"strpud\\\"\"]}}}}},weight:90},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:saddle\",Damage:0,Count:1}}},weight:40},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:brewing_stand\",Damage:0,Count:1}}},weight:30},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:totem_of_undying\",Damage:0,Count:1}}},weight:2},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:ghast_tear\",Damage:0,Count:1}}},weight:20},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:ender_pearl\",Damage:0,Count:3}}},weight:50},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:elytra\",Damage:0,Count:1}}},weight:5},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:potion\",Damage:0,Count:1,tag:{custom_potion_effects:[{id:"minecraft:fire_resistance",amplifier:0,duration:12000,show_particles:0b}]}}}},weight:60},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:golden_carrot\",Damage:0,Count:1}}},weight:30},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:golden_carrot\",Damage:0,Count:5}}},weight:30},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:emerald\",Damage:0,Count:2}}},weight:30},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:experience_bottle\",Damage:0,Count:6}}},weight:30},{data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:experience_bottle\",Damage:0,Count:64}}},weight:10}]}"

#old structures
data merge block 999978 187 999975 {auto:0b}

#spooder den fix
execute in overworld run data modify block 999984 139 999976 Command set value "execute at @e[name=Glowy2] run setblock ~ ~1 ~ minecraft:spawner{SpawnData:{entity:{id:\"minecraft:spider\",Tags:[\"MobMentDone\",\"NoInvis\"],ArmorItems:[{},{id:\"minecraft:iron_sword\",Count:1b,tag:{Enchantments:[{id:\"minecraft:efficiency\",lvl:10}]}},{},{}],ArmorDropChances:[0.085F,0.05F,0.085F,0.085F]}},SpawnCount:1,SpawnRange:10,RequiredPlayerRange:8,Delay:1,MinSpawnDelay:30,MaxSpawnDelay:180,MaxNearbyEntities:30}"
execute in overworld run data modify block 999984 154 999976 Command set value "execute at @e[name=Glowy] run setblock ~ ~0 ~ minecraft:spawner{SpawnData:{entity:{id:\"minecraft:cave_spider\",Particle:mobSpell}},SpawnCount:1,SpawnRange:20,RequiredPlayerRange:40,Delay:1,MinSpawnDelay:30,MaxSpawnDelay:160,MaxNearbyEntities:40}"

#catalyst and stripmine
setblock 999976 130 999971 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:specialitems/miningcatalyst/miningcatalysttimer",TrackOutput:0} destroy
setblock 999977 130 999971 repeating_command_block[facing=up]{auto:0b,Command:"function zzzzdonotuse:specialitems/stripmine/stripminetimer",TrackOutput:0} destroy


#wither fix
data modify block 999978 135 999975 Command set value "execute at @a[tag=K] run execute at @e[type=wither_skeleton,distance=..4] run execute if entity @p[nbt={active_effects:[{id:\"minecraft:wither\"}]},distance=..4] run scoreboard players add @e[name=DayQ,type=armor_stand] TestforReplace 1"
data modify block 999978 136 999975 Command set value "tag @a[nbt={active_effects:[{id:\"minecraft:wither\"}]}] add P2"




data merge block 999979 140 999975 {auto:0b}
data merge block 999977 149 999974 {auto:0b}
data merge block 999977 152 999974 {auto:0b}
data merge block 999977 156 999974 {auto:0b}
data merge block 999977 187 999977 {auto:0b}
data merge block 999977 189 999977 {auto:0b}

data merge block 999977 123 999977 {auto:0b}
data merge block 999977 124 999977 {auto:0b}
data merge block 999977 125 999977 {auto:0b}
data merge block 999977 126 999977 {auto:0b}
data merge block 999977 127 999977 {auto:0b}
data merge block 999977 128 999977 {auto:0b}
data merge block 999977 129 999977 {auto:0b}

#HALF SEC TIMER STUFF
data merge block 999978 162 999975 {auto:0b}
data merge block 999978 174 999975 {auto:0b}
data merge block 999978 175 999975 {auto:0b}
data merge block 999978 176 999975 {auto:0b}
data merge block 999978 177 999975 {auto:0b}
data merge block 999978 178 999975 {auto:0b}
data merge block 999979 178 999975 {auto:0b}
data merge block 999979 180 999975 {auto:0b}
data merge block 999979 160 999975 {auto:0b}
setblock 999979 162 999975 minecraft:chain_command_block[facing=up] destroy
data merge block 999979 168 999975 {auto:0b}
data merge block 999979 174 999975 {auto:0b}




#minute timer stuff
data merge block 999978 143 999975 {auto:0b}
data merge block 999978 144 999975 {auto:0b}
data merge block 999978 145 999975 {auto:0b}
data merge block 999978 146 999975 {auto:0b}


scoreboard objectives add KyuBioCorrupt dummy
scoreboard objectives add Kyu3secTimer dummy
scoreboard objectives add DayQDummy dummy
scoreboard objectives add DayQDummy2 dummy
scoreboard objectives add HardModeRandom dummy
scoreboard objectives add HardModeDayCheck dummy

scoreboard objectives add KyuDummy3 dummy
scoreboard objectives add KyuDummy4 dummy
scoreboard objectives add KyuDummy5 dummy
scoreboard objectives add FireballArrowKyu dummy
scoreboard objectives add KyuLanternLuck dummy
scoreboard objectives add KyuLanternFollowRange dummy
scoreboard objectives add KyuSmallGraveTimer dummy

scoreboard objectives add CoolBugFacts dummy
scoreboard objectives add CoolBugFactsTimer dummy

scoreboard objectives add StructureLoadCheck dummy