execute if score special_items option matches 1 if score op option matches 0 as @e[type=marker,tag=normalChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/normal/isla"} replace barrel
execute if score special_items option matches 1 if score op option matches 1 as @e[type=marker,tag=normalChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/op/isla"} replace barrel
execute if score special_items option matches 0 if score op option matches 0 as @e[type=marker,tag=normalChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/normal/isla"} replace barrel
execute if score special_items option matches 0 if score op option matches 1 as @e[type=marker,tag=normalChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/op/isla"} replace barrel

execute if score special_items option matches 1 if score op option matches 0 as @e[type=marker,tag=middleChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/normal/semimid"} replace barrel
execute if score special_items option matches 1 if score op option matches 1 as @e[type=marker,tag=middleChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/op/semimid"} replace barrel
execute if score special_items option matches 0 if score op option matches 0 as @e[type=marker,tag=middleChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/normal/semimid"} replace barrel
execute if score special_items option matches 0 if score op option matches 1 as @e[type=marker,tag=middleChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/op/semimid"} replace barrel

execute if score special_items option matches 1 if score op option matches 0 as @e[type=marker,tag=centralChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/normal/mid"} replace barrel
execute if score special_items option matches 1 if score op option matches 1 as @e[type=marker,tag=centralChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/op/mid"} replace barrel
execute if score special_items option matches 0 if score op option matches 0 as @e[type=marker,tag=centralChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/normal/mid"} replace barrel
execute if score special_items option matches 0 if score op option matches 1 as @e[type=marker,tag=centralChest] at @s run fill ~ ~ ~ ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/op/mid"} replace barrel

execute positioned 1000 100 1000 run playsound minecraft:block.ender_chest.open master @a ~ ~ ~ 1000 0.7

title @a times 10 30 10
title @a subtitle {"color":"green","fallback":"The barrels have been refilled!","italic":false,"translate":"subchronos.game.refill"}
title @a title {"text":" ","color":"green"}