tag @s remove AlchemistItems
execute as @s[nbt={Inventory:[{id:"minecraft:brewing_stand"}]},nbt=!{Inventory:[{id:"minecraft:brewing_stand",Count:1b}]},scores={health=5..}] run tag @s add AlchemistItems
execute as @s[nbt={Inventory:[{id:"minecraft:brewing_stand",Count:2b}]},scores={health=5..}] run tag @s add AlchemistItems
clear @s[tag=AlchemistItems] brewing_stand 2
#do void damage
tag @s[tag=AlchemistItems] add DoVoid
execute as @s[tag=AlchemistItems] run scoreboard players set @s KyuVoid -10
execute as @s[tag=AlchemistItems] run function zzzzdonotuse:misc/activatevoiddamage
give @s[tag=AlchemistItems] minecraft:villager_spawn_egg{EntityTag:{ id:"minecraft:villager",CustomName:"\"Supreme Alchemist\"",VillagerData:{level:5,profession:"minecraft:cleric",type:"minecraft:plains"},Profession:2,Career:0,CareerLevel:200,Offers:{ Recipes:[ {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:emerald,Count:4},buyB:{id:gold_ingot,Count:8},sell:{id:brewing_stand,Count:1}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:emerald,Count:27},buyB:{id:gold_block,Count:2},sell:{id:blaze_powder,Count:1}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:emerald,Count:2},buyB:{id:diamond,Count:2},sell:{id:potion,Count:3,tag:{Potion:"minecraft:strength"}}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:emerald,Count:1},buyB:{id:sugar,Count:2},sell:{id:potion,Count:3,tag:{Potion:"minecraft:strong_swiftness"}}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:emerald,Count:3},buyB:{id:pufferfish,Count:1},sell:{id:potion,Count:2,tag:{Potion:"minecraft:water_breathing"}}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:diamond,Count:6},buyB:{id:iron_block,Count:2},sell:{id:potion,Count:1,tag:{display:{Name:"Resistance Potion"},CustomPotionEffects:[{Id:11,Amplifier:0,Duration:3600}],Potion:"minecraft:mundane",CustomPotionColor:3159616}}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:emerald,Count:5},buyB:{id:golden_apple,Count:1},sell:{id:splash_potion,Count:1,tag:{display:{Name:"GETMEOUTTAHERE"},CustomPotionEffects:[{Id:10,Amplifier:0,Duration:120},{Id:1,Amplifier:2,Duration:100},{Id:3,Amplifier:2,Duration:100},{Id:11,Amplifier:0,Duration:300},{Id:22,Amplifier:0,Duration:1200}],Potion:"minecraft:mundane",CustomPotionColor:3159616}}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:gold_block,Count:7},buyB:{id:emerald,Count:8},sell:{id:ghast_tear,Count:1}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:gold_ingot,Count:2},buyB:{id:emerald,Count:4},sell:{id:glistering_melon_slice,Count:2}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:ender_pearl,Count:3},buyB:{id:lava_bucket,Count:1},sell:{id:ender_eye,Count:3}}, {rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:brewing_stand,Count:1},buyB:{id:emerald,Count:1},sell:{id:chest,Count:1,tag:{display:{Name:'{"text":"Potion Chest","color":"light_purple"}',Lore:["\"Contains a random assortment of potions.\""]},Enchantments:[{}],BlockEntityTag:{LootTable:"chests/potionchest"}}}},   ]}}} 1
tag @s remove AlchemistItems