Skip to content

Instantly share code, notes, and snippets.

@jkctech
Last active October 17, 2021 15:49
Show Gist options
  • Save jkctech/62c67d1431ca6bdc7253ac589a39e942 to your computer and use it in GitHub Desktop.
Save jkctech/62c67d1431ca6bdc7253ac589a39e942 to your computer and use it in GitHub Desktop.
Fixes for One Chest Survival 1.17
# DETECT
execute as @a at @s if entity @s[scores={crouching=1..},nbt={SelectedItem:{id:"minecraft:book",Count:1b}}] if block ~ ~-0.8 ~ minecraft:chest run tag @s add pickup
execute as @a at @s if entity @s[scores={crouching=1..},nbt={SelectedItem:{id:"minecraft:book",Count:1b}}] if block ~ ~-0.8 ~ minecraft:barrel run tag @s add pickup
# GIVE ITEMS
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=ultimate_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Ultimate Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Ultimate Chest","color":"aqua","italic":false}']},chest:1,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=village_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Village Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Village Chest","color":"aqua","italic":false}']},chest:2,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=shipwreck_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Shipwreck Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Shipwreck Chest","color":"aqua","italic":false}']},chest:3,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=underwater_ruin_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Underwater Ruin Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Underwater Ruin Chest","color":"aqua","italic":false}']},chest:4,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=stronghold_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Stronghold Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Stronghold Chest","color":"aqua","italic":false}']},chest:5,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=bastion_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Bastion Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Bastion Chest","color":"aqua","italic":false}']},chest:6,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=end_city_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"End City Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent End City Chest","color":"aqua","italic":false}']},chest:7,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=dungeon_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Dungeon Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Dungeon Chest","color":"aqua","italic":false}']},chest:8,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=mansion_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"MansionChest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent MansionChest","color":"aqua","italic":false}']},chest:9,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=outpost_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Pillager Outpost Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Pillager Outpost Chest","color":"aqua","italic":false}']},chest:10,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=mineshaft_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Mineshaft Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Mineshaft Chest","color":"aqua","italic":false}']},chest:11,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=treasure_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Treasure Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Treasure Chest","color":"aqua","italic":false}']},chest:12,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=desert_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Desert Temple Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Desert Temple Chest","color":"aqua","italic":false}']},chest:13,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=jungle_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Jungle Temple Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Jungle Temple Chest","color":"aqua","italic":false}']},chest:14,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=igloo_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Igloo Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Igloo Chest","color":"aqua","italic":false}']},chest:15,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=fortress_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Nether Fortress Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Nether Fortress Chest","color":"aqua","italic":false}']},chest:16,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=starter_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Starter Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Starter Chest","color":"aqua","italic":false}']},chest:17,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=ruined_portal_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Ruined Portal Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Ruined Portal Chest","color":"aqua","italic":false}']},chest:18,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=ocean_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Ocean Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Ocean Chest","color":"aqua","italic":false}']},chest:19,Enchantments:[{}]} 1
execute as @a[tag=pickup] at @s if entity @e[type=armor_stand,distance=..1.5,sort=nearest,limit=1,tag=foliage_chest] run item replace entity @s weapon.mainhand with knowledge_book{display:{Name:'{"text":"Foliage Chest","color":"gold","bold":true,"italic":false}',Lore:['{"text":"Drop on a chest or barrel for a permanent Foliage Chest","color":"aqua","italic":false}']},chest:20,Enchantments:[{}]} 1
# PARTICLES
execute as @e[tag=pickup] at @s run particle enchant ~ ~0.5 ~ 0 0 0 1 40 force
execute as @e[tag=pickup] at @s run particle poof ~ ~0.5 ~ 0.1 0.1 0.1 0.5 15 force
execute as @e[tag=pickup] at @s run particle end_rod ~ ~0.5 ~ 0.2 0.2 0.2 0.5 25 force
execute as @e[tag=new_chest] at @s run playsound item.book.page_turn master @a ~ ~ ~ 4
# RESET
execute as @a[tag=pickup] at @s if entity @s[nbt={SelectedItem:{id:"minecraft:knowledge_book",Count:1b}}] run kill @e[type=armor_stand,limit=1,sort=nearest]
tag @a remove pickup
# FIREWORK PILLAGERS
execute as @e[tag=rocket] at @s if entity @s[type=pillager,nbt={HandItems:[{id:"minecraft:crossbow",Count:1b,tag:{ChargedProjectiles:[{id:"minecraft:arrow",Count:1b},{},{}],Charged:1b}},{}]}] run item replace entity @s weapon.mainhand with crossbow{ChargedProjectiles:[{id:"minecraft:firework_rocket",Count:1b,tag:{Fireworks:{Flight:2b,Explosions:[{Type:0,Trail:1b,Colors:[I;16777215,16776960,16746496],FadeColors:[I;11053224,7364682,0]},{Type:0,Trail:1b,Colors:[I;16777215,16776960,16746496],FadeColors:[I;11053224,7364682,0]},{Type:0,Trail:1b,Colors:[I;16777215,16776960,16746496],FadeColors:[I;11053224,7364682,0]}]}}},{},{}],Charged:1b}
# PHANTOMS
execute as @e[tag=phantom] at @s run data merge entity @s {Fire:0}
# NOTIFY PLAYER
execute as @e[type=armor_stand,tag=plague,tag=!started] at @a run playsound block.bell.resonate master @a ~ ~ ~ 1 0.5
execute as @e[type=armor_stand,tag=plague,tag=!started,tag=easy] at @s unless entity @e[distance=..256,tag=plague,tag=started] run tellraw @a[distance=..256] {"text":"An Easy Event is Occuring","color":"gold","bold":true}
execute as @e[type=armor_stand,tag=plague,tag=!started,tag=medium] at @s unless entity @e[distance=..256,tag=plague,tag=started] run tellraw @a[distance=..256] {"text":"An Event is Occuring","color":"gold","bold":true}
execute as @e[type=armor_stand,tag=plague,tag=!started,tag=hard] at @s unless entity @e[distance=..256,tag=plague,tag=started] run tellraw @a[distance=..256] {"text":"A Hard Event is Occuring","color":"gold","bold":true}
execute as @e[type=armor_stand,tag=plague,tag=!started] at @s unless entity @e[distance=..256,tag=plague,tag=started] run tellraw @a[distance=..256] {"text":"A Plague has Begun!","color":"dark_red","bold":true}
execute as @e[type=armor_stand,tag=plague,tag=!started] at @s if entity @e[distance=..256,tag=plague,tag=started] run tellraw @a[distance=..256] {"text":"The Plague has Spread!","color":"dark_red","bold":true}
# START
execute as @e[type=armor_stand,tag=plague,tag=!started] at @s store result score @s event_tick run time query daytime
execute as @e[type=armor_stand,tag=plague,tag=!started] at @s run scoreboard players set @s cooldown -1
execute as @e[type=armor_stand,tag=plague,tag=!started] at @s run scoreboard players operation @s event_tick *= @s cooldown
# FIRST INFECTED
execute as @e[type=armor_stand,tag=plague,tag=!started,tag=easy] at @s run tag @e[distance=..256,limit=2,sort=random,type=!#one_chest:plague_immune] add infected_easy
execute as @e[type=armor_stand,tag=plague,tag=!started,tag=medium] at @s run tag @e[distance=..256,limit=1,sort=nearest,type=!player,type=!#one_chest:plague_immune] add infected
execute as @e[type=armor_stand,tag=plague,tag=!started,tag=medium] at @s run tag @e[distance=..256,limit=3,sort=random,type=!#one_chest:plague_immune] add infected
execute as @e[type=armor_stand,tag=plague,tag=!started,tag=hard] at @s run tag @e[distance=..256,limit=2,sort=nearest,type=!player,type=!#one_chest:plague_immune] add infected_hard
execute as @e[type=armor_stand,tag=plague,tag=!started,tag=hard] at @s run tag @e[distance=..256,limit=5,sort=random,type=!#one_chest:plague_immune] add infected_hard
execute as @e[type=armor_stand,tag=plague,tag=!started] at @s run scoreboard players set @s cooldown 1
execute as @e[type=armor_stand,tag=plague,tag=!started] at @s run tag @s add started
# EVENT
# INFECTION RANGE
execute as @e[type=armor_stand,tag=plague,tag=easy] at @e[tag=infected,distance=..256] run tag @e[distance=..0.5,type=!#one_chest:plague_immune,tag=!infected_easy,limit=1] add infected_easy
execute as @e[type=armor_stand,tag=plague,tag=easy] at @e[tag=infected,distance=..256] if score @s cooldown matches 20 run tag @e[distance=..1,type=!#one_chest:plague_immune,tag=!infected,limit=1] add infected_easy
execute as @e[type=armor_stand,tag=plague,tag=medium] at @e[tag=infected,distance=..256] run tag @e[distance=..1,type=!#one_chest:plague_immune,tag=!infected,limit=1] add infected
execute as @e[type=armor_stand,tag=plague,tag=medium] at @e[tag=infected,distance=..256] if score @s cooldown matches 20 run tag @e[distance=..2.5,type=!#one_chest:plague_immune,tag=!infected,limit=1] add infected
execute as @e[type=armor_stand,tag=plague,tag=hard] at @e[tag=infected,distance=..256] run tag @e[distance=..1.5,type=!#one_chest:plague_immune,tag=!infected_hard,limit=1] add infected_hard
execute as @e[type=armor_stand,tag=plague,tag=hard] at @e[tag=infected,distance=..256] if score @s cooldown matches 20 run tag @e[distance=..5,type=!#one_chest:plague_immune,tag=!infected_hard,limit=1] add infected_hard
# PLAGUE OVERRIDE
execute as @e[tag=infected_hard] at @s run tag @s remove infected
execute as @e[tag=infected_hard] at @s run tag @s remove infected_easy
execute as @e[tag=infected] at @s run tag @s remove infected_easy
# PARTICLES
execute as @e[tag=infected_easy] at @s run particle dust 0.500 0.500 0.500 1 ~ ~ ~ 0.15 0.5 0.15 0.1 1 normal
execute as @e[tag=infected] at @s run particle dust 0.200 0.200 0.200 1 ~ ~ ~ 0.1 0.25 0.1 0.1 1 normal
execute as @e[tag=infected_hard] at @s run particle dust 0.000 0.000 0.000 1 ~ ~ ~ 0.05 0.15 0.05 0.1 1 normal
# PLAGUE EFFECTS
execute as @e[tag=infected_easy] at @s run effect give @s slowness 1 1 true
execute as @e[tag=infected_easy] at @s run effect give @s weakness 1 0 true
execute as @e[tag=infected_easy] at @s if score @e[type=armor_stand,tag=plague,sort=nearest,limit=1] cooldown matches 20 run effect give @s hunger 2 0 true
execute as @e[tag=infected] at @s run effect give @s slowness 1 1 true
execute as @e[tag=infected] at @s run effect give @s weakness 1 0 true
execute as @e[tag=infected] at @s if score @e[type=armor_stand,tag=plague,sort=nearest,limit=1] cooldown matches 20 run effect give @s poison 2 0 true
execute as @e[tag=infected] at @s if score @e[type=armor_stand,tag=plague,sort=nearest,limit=1] cooldown matches 20 run effect give @s hunger 2 0 true
execute as @e[tag=infected_hard] at @s run effect give @s slowness 1 2 true
execute as @e[tag=infected_hard] at @s run effect give @s weakness 1 1 true
execute as @e[tag=infected_hard] at @s run effect give @s mining_fatigue 1 0 true
execute as @e[tag=infected_hard] at @s if score @e[type=armor_stand,tag=plague,sort=nearest,limit=1] cooldown matches 20 run effect give @s wither 2 0 true
execute as @e[tag=infected_hard] at @s if score @e[type=armor_stand,tag=plague,sort=nearest,limit=1] cooldown matches 20 run effect give @s hunger 2 1 true
# SURGE COUNTDOWN
execute as @e[type=armor_stand,tag=plague] at @s run scoreboard players add @s event_tick 1
execute as @e[type=armor_stand,tag=plague] at @s run scoreboard players add @s cooldown 1
execute as @e[type=armor_stand,tag=plague] at @s if score @s cooldown matches 25 run scoreboard players set @s cooldown 1
# RECOVERY COUNTDOWN
execute as @e[tag=infected_easy] at @s run scoreboard players add @s plague_tick 1
execute as @e[tag=infected] at @s run scoreboard players add @s plague_tick 1
execute as @e[tag=infected_hard] at @s run scoreboard players add @s plague_tick 1
execute as @e[tag=infected_easy] if score @s plague_tick matches 300 at @s run scoreboard players set @s plague_tick -1
execute as @e[tag=infected] if score @s plague_tick matches 900 at @s run scoreboard players set @s plague_tick -1
execute as @e[tag=infected_hard] if score @s plague_tick matches 2400 at @s run scoreboard players set @s plague_tick -1
execute as @e[tag=infected_easy] if score @s plague_tick matches -1 at @s run tag @s remove infected_easy
execute as @e[tag=infected] if score @s plague_tick matches -1 at @s run tag @s remove infected
execute as @e[tag=infected_hard] if score @s plague_tick matches -1 at @s run tag @s remove infected_hard
execute as @e[tag=infected_easy] if predicate one_chest:plague_cure at @s run tag @s remove infected_easy
execute as @e[tag=infected] if predicate one_chest:plague_cure at @s run tag @s remove infected
execute as @e[tag=infected_hard] if predicate one_chest:plague_cure at @s run tag @s remove infected_hard
# END EVENT
execute as @e[type=armor_stand,tag=plague] at @s if score @s event_tick matches 6000 run tag @s add finished
execute as @e[type=armor_stand,tag=plague,tag=easy] at @s unless entity @e[distance=..256,tag=infected_easy] run tag @s add finished
execute as @e[type=armor_stand,tag=plague,tag=medium] at @s unless entity @e[distance=..256,tag=infected] run tag @s add finished
execute as @e[type=armor_stand,tag=plague,tag=hard] at @s unless entity @e[distance=..256,tag=infected_hard] run tag @s add finished
execute as @e[type=armor_stand,tag=plague,tag=finished] at @s if entity @e[distance=..256,tag=plague,tag=started,tag=!finished] run tellraw @a[distance=..256] {"text":"The Plague has Shrunken!","color":"dark_green","bold":true}
execute as @e[type=armor_stand,tag=plague,tag=finished,tag=easy] at @s unless entity @e[distance=..256,tag=infected_easy] run tellraw @a[distance=..256] {"text":"The Plague has been Eradicated!","color":"dark_green","bold":true}
execute as @e[type=armor_stand,tag=plague,tag=finished,tag=medium] at @s unless entity @e[distance=..256,tag=infected] run tellraw @a[distance=..256] {"text":"The Plague has been Eradicated!","color":"dark_green","bold":true}
execute as @e[type=armor_stand,tag=plague,tag=finished,tag=hard] at @s unless entity @e[distance=..256,tag=infected_hard] run tellraw @a[distance=..256] {"text":"The Plague has been Eradicated!","color":"dark_green","bold":true}
execute as @e[type=armor_stand,tag=plague,tag=finished] at @s run tag @e[distance=..256] remove infected_easy
execute as @e[type=armor_stand,tag=plague,tag=finished] at @s run tag @e[distance=..256] remove infected
execute as @e[type=armor_stand,tag=plague,tag=finished] at @s run tag @e[distance=..256] remove infected_hard
execute as @e[type=armor_stand,tag=plague,tag=finished] at @s run kill @s
# SPREAD ARMOR STAND
execute as @e[type=armor_stand,tag=undead_seige] at @s run spreadplayers ~ ~ 1 64 true @s
# CREATE EVENT
# SPAWN ZOMBIES
execute as @e[type=armor_stand,tag=undead_seige] at @s run summon zombie ~ ~ ~ {PersistenceRequired:1b,Tags:["undead"],ArmorItems:[{id:"minecraft:golden_boots",Count:1b},{id:"minecraft:golden_leggings",Count:1b},{id:"minecraft:golden_chestplate",Count:1b},{id:"minecraft:golden_helmet",Count:1b}],ActiveEffects:[{Id:2b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:11b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:18b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:24b,Amplifier:255b,Duration:200,ShowParticles:1b}]}
execute as @e[type=armor_stand,tag=undead_seige] at @s run summon zombie ~ ~ ~ {PersistenceRequired:1b,Tags:["undead"],ArmorItems:[{id:"minecraft:leather_boots",Count:1b},{id:"minecraft:leather_leggings",Count:1b},{id:"minecraft:leather_chestplate",Count:1b},{id:"minecraft:leather_helmet",Count:1b}],ActiveEffects:[{Id:2b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:11b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:18b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:24b,Amplifier:255b,Duration:200,ShowParticles:1b}]}
execute as @e[type=armor_stand,tag=undead_seige] at @s run summon zombie ~ ~ ~ {PersistenceRequired:1b,Tags:["undead"],ArmorItems:[{},{},{},{id:"minecraft:leather_helmet",Count:1b}],ActiveEffects:[{Id:2b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:11b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:18b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:24b,Amplifier:255b,Duration:200,ShowParticles:1b}]}
execute as @e[type=armor_stand,tag=undead_seige] at @s run summon zombie ~ ~ ~ {PersistenceRequired:1b,Tags:["undead"],ArmorItems:[{},{},{},{id:"minecraft:leather_helmet",Count:1b}],ActiveEffects:[{Id:2b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:11b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:18b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:24b,Amplifier:255b,Duration:200,ShowParticles:1b}]}
# SPAWN HUSKS
execute as @e[type=armor_stand,tag=undead_seige] at @s run summon husk ~ ~ ~ {PersistenceRequired:1b,Tags:["undead"],ArmorItems:[{},{},{},{id:"minecraft:leather_helmet",Count:1b}],ActiveEffects:[{Id:2b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:11b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:18b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:24b,Amplifier:255b,Duration:200,ShowParticles:1b}]}
# SPAWN SKELETONS
execute as @e[type=armor_stand,tag=undead_seige] at @s run summon skeleton ~ ~ ~ {PersistenceRequired:1b,Tags:["undead"],HandItems:[{id:"minecraft:bow",Count:1b},{}],ArmorItems:[{},{},{},{id:"minecraft:leather_helmet",Count:1b}],ActiveEffects:[{Id:2b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:11b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:18b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:24b,Amplifier:255b,Duration:200,ShowParticles:1b}]}
execute as @e[type=armor_stand,tag=undead_seige] at @s run summon skeleton ~ ~ ~ {PersistenceRequired:1b,Tags:["undead"],HandItems:[{id:"minecraft:bow",Count:1b},{}],ArmorItems:[{},{},{},{id:"minecraft:leather_helmet",Count:1b}],ActiveEffects:[{Id:2b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:11b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:18b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:24b,Amplifier:255b,Duration:200,ShowParticles:1b}]}
# SPAWN STRAYS
execute as @e[type=armor_stand,tag=undead_seige] at @s run summon stray ~ ~ ~ {PersistenceRequired:1b,Tags:["undead"],HandItems:[{id:"minecraft:bow",Count:1b},{}],ArmorItems:[{},{},{},{id:"minecraft:leather_helmet",Count:1b}],ActiveEffects:[{Id:2b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:11b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:18b,Amplifier:255b,Duration:100,ShowParticles:1b},{Id:24b,Amplifier:255b,Duration:200,ShowParticles:1b}]}
# SPREAD MOBS
execute as @e[type=armor_stand,tag=undead_seige] at @s run spreadplayers ~ ~ 1 12 false @e[tag=undead,distance=..2]
kill @e[type=armor_stand,tag=undead_seige]
# NOTIFY PLAYER
execute as @e[type=armor_stand,tag=undead_seige] at @a run playsound minecraft:ambient.cave master @a ~ ~ ~ 1
tellraw @a[distance=..256] {"text":"An Event is Occuring","color":"gold","bold":true}
tellraw @a[distance=..256] {"text":"A Undead Seige has arrived!","color":"dark_red","bold":true}
@jkctech
Copy link
Author

jkctech commented Oct 17, 2021

Some functions in this datapack were throwing errors and/or not functioning at all in MC 1.17.0
I have made some minor changes to the syntax only, just to make the datapack functioning again.

Changes:

data/one_chest/functions/chests/chest_pickup.mcfunction
data/one_chest/functions/events/manager.mcfunction

  • Used old '/replaceitem' command. Has been replaced now by '/item replace'

data/one_chest/functions/events/plague.mcfunction

  • Wrong syntax for '/tag' command: run tag remove @s infected => run tag @s remove infected

data/one_chest/functions/events/undead_seige_medium.mcfunction

  • Added missing '}' @ line 9, col 255

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment