execute as @a[tag=K] store result score @s KyuTime run time query daytime
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"ENDER\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:ender_eye",Count:1b},buyB:{id:"minecraft:glistering_melon_slice",Count:23b},sell:{id:"minecraft:black_banner",Count:1b,tag:{kyutrinket:1b,kyuvoidtrinket:1b,display:{Name:"{\"text\":\"Eye of the Void\"}",Lore:["\"Gives every non-farm-animal mob a small chance to\"","\"grant an ender pearl.\"","\"NOTE: PLACING THIS ITEM WILL BREAK IT. THE EFFECT \"","\"IS GAINED BY HOLDING IT IN YOUR INVENTORY.\""]},BlockEntityTag:{Base:0,Patterns:[{Pattern:mc,Color:9},{Pattern:flo,Color:15},{Pattern:tl,Color:10},{Pattern:tr,Color:10},{Pattern:bl,Color:10},{Pattern:cbo,Color:10},{Pattern:br,Color:10},{Pattern:bo,Color:15}]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:1}]},}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"ZAMB\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:allium",Count:4b},buyB:{id:"minecraft:gold_ingot",Count:5b},sell:{id:"minecraft:glowstone_dust",Count:1b,tag:{kyutrinket:1b,kyuspices:1b,display:{Name:"{\"text\":\"Suspicious Spices\"}",Lore:['[{"text":"Effect 1 - ","color":"dark_aqua"},{"text":"Saturation","color":"gold"}]','{"text":"All food items grant a tiny bit of extra saturation/hunger restoration.","color":"gold"}','{"text":"Zombie flesh in particular gains a massive boost,","color":"gold"}','{"text":"and the hunger effect it sometimes gives will be removed.","color":"gold"}','{"text":""}','[{"text":"Effect 2 - ","color":"dark_aqua"},{"text":"Health Boost","color":"light_purple"}]','{"text":"Golden apples additionally grant ","color":"light_purple"}','{"text":"Health Boost I for 2 minutes.","color":"light_purple"}']},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:2}]}}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"LAVACHARM\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:diamond_boots",Count:1b},buyB:{id:"minecraft:obsidian",Count:64b},sell:{id:"minecraft:leather_boots",Count:1b,tag:{kyutrinket:1b,kyulavaboots:1b,display:{color:8982758,Name:"{\"text\":\"Lava Wandering Boots\"}",Lore:["\"Cools lava underneath your feet,\"","\"turning it into obsidian.\""]},HideFlags:1,Enchantments:[{id:"minecraft:fire_protection",lvl:4},{id:"minecraft:unbreaking",lvl:3}],AttributeModifiers:[{AttributeName:"generic.armor",Name:"generic.armor",Amount:3,Operation:0,UUID:[I;6969,6969,6969,1221],Slot:"feet"},{AttributeName:"generic.armor_toughness",Name:"generic.armor_toughness",Amount:2,Operation:0,UUID:[I;6969,6969,6969,1222],Slot:"feet"}]}}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"DUBLOON\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:golden_apple",Count:1b},buyB:{id:"minecraft:ghast_tear",Count:1b},sell:{id:"minecraft:sunflower",Count:1b,tag:{kyutrinket:1b,kyudubloon:1b,display:{Name:"{\"text\":\"Lucky Dubloon\"}",Lore:["\"Allows you to access the rare drop table\"","\"randomly, at any time. Also gives +1 luck.\""]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:4}]}}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"NATURE\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:brown_wool",Count:4b},buyB:{id:"minecraft:golden_carrot",Count:12b},sell:{id:"minecraft:brown_banner",Count:1b,tag:{kyutrinket:1b,kyunaturegift:1b,display:{Name:"{\"text\":\"Nature's Gift\"}",Lore:["\"Doubles the rate at which baby animals\"","\"or villagers grow up over time.\"","\"NOTE: PLACING THIS ITEM WILL BREAK IT. THE EFFECT \"","\"IS GAINED BY HOLDING IT IN YOUR INVENTORY.\""]},BlockEntityTag:{Base:5,Patterns:[{Pattern:cr,Color:5},{Pattern:ts,Color:15},{Pattern:flo,Color:5},{Pattern:mr,Color:1},{Pattern:cbo,Color:15},{Pattern:mc,Color:10}]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:1}]},}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"WITCHY\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:golden_carrot",Count:12b},buyB:{id:"minecraft:iron_helmet",Count:1b},sell:{id:"minecraft:turtle_helmet",Count:1b,tag:{kyutrinket:1b,kyugoggles:1b,display:{Name:"{\"text\":\"Night Vision Goggles\"}",Lore:["\"Grants night vision, even when not worn...Odd.\""]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:6}]}}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"WATER\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:sponge",Count:8b},buyB:{id:"minecraft:enchanting_table",Count:1b},sell:{id:"minecraft:prismarine_shard",Count:1b,tag:{kyutrinket:1b,kyuenchantedshard:1b,display:{Name:"{\"text\":\"Enchanted Shard\"}",Lore:["\"Anyone who holds one of these\"","\"will be granted permanent water-breathing\"","\"and underwater mining haste.\""]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:7}]}}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"KNOWLEDGE\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:paper",Count:1b,tag:{kyusheet:1b,Enchantments:[{id:"minecraft:protection",lvl:1s}],HideFlags:1,display:{Name:"{\"text\":\"Magical Spell Sheet\"}",Lore:["\"Can be used as a reagant to acquire spells via the nether dungeon shop.\""]}}},buyB:{id:"minecraft:gold_block",Count:1b},sell:{id:"minecraft:book",Count:1b,tag:{kyutrinket:1b,kyuxptrinket:1b,display:{Name:"{\"text\":\"Pure Unrefined Knowledge\"}",Lore:["\"Passively grants xp, and gives additional\"","\"experience when killing mobs.\"","\"\"","\"'You know what I like a lot more than xp? KNOWLEDGE.'\""]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:10}]}}}]}}
#execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"WITCHCLOCK\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:clock",Count:1b},buyB:{id:"minecraft:enchanting_table",Count:1b},sell:{id:"minecraft:clock",Count:1b,tag:{kyutrinket:1b,kyudayextender:1b,display:{Name:"{\"text\":\"Dawn's Daylight\"}",Lore:["\"If held at the start of the day,\"","\"extends the amount of daytime by 4:00.\"","\"\"","\"'Is it 1358 yet?'\""]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:10}]}}}]}}
execute if entity @a[tag=K,scores={KyuTime=13685..22335}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data modify entity @s Offers.Recipes append value {buy:{id:"minecraft:clock",Count:1b},buyB:{id:"minecraft:enchanting_table",Count:1b},sell:{id:"minecraft:clock",Count:1b,tag:{kyutrinket:1b,kyudayextender:1b,display:{Name:"{\"text\":\"Dawn's Daylight\"}",Lore:["\"If held at the start of the day,\"","\"extends the amount of daytime by 4:00.\"","\"\"","\"'Is it 1358 yet?'\""]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:10}]}}}


execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"STATUS\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:beetroot",Count:1b},buyB:{id:"minecraft:damaged_anvil",Count:1b},sell:{id:"minecraft:white_banner",Count:1b,tag:{display:{Name:"{\"text\":\"No-status\"}",Lore:["Disables the effects of the following status debuffs:"]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:9}]}}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"SPOODER\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:beetroot",Count:1b},buyB:{id:"minecraft:damaged_anvil",Count:1b},sell:{id:"minecraft:white_banner",Count:1b,tag:{display:{Name:"{\"text\":\"Spooder\"}",Lore:["spooooder"]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:10}]}}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"SLOWFALL\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:4b},buyB:{id:"minecraft:phantom_membrane",Count:4b},sell:{id:"minecraft:feather",Count:1b,tag:{kyutrinket:1b,kyuslowfall:1b,display:{Name:"{\"text\":\"Slowfall\"}",Lore:["\"Shortly after being equipped in the main hand,\"","\"grants slowfall for as long as it remains equipped.\""]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:11}]}}}]}}
execute as @e[name=KyuAreaBlocks] run execute at @s positioned ~4 ~50 ~ run execute if entity @e[distance=..5,nbt={Item:{tag:{display:{Lore:["\"FOLLOWER\""]}}}}] run execute as @e[limit=1,type=villager,name=Stranger,tag=!got] run data merge entity @s {VillagerData:{level:5,profession:"minecraft:librarian",type:"minecraft:swamp"},CareerLevel:1,Offers:{Recipes:[{buy:{id:"minecraft:beetroot",Count:1b},buyB:{id:"minecraft:damaged_anvil",Count:1b},sell:{id:"minecraft:white_banner",Count:1b,tag:{display:{Name:"{\"text\":\"Follower\"}",Lore:["Woof woof. Bark bark?"]},HideFlags:1,Enchantments:[{id:"minecraft:lure",lvl:12}]}}}]}}
