execute if score hardmode hardmode matches 1 run function survivalplus:merchants/wandering/upgradekit
execute if score hardmode hardmode matches 1 run data modify entity @s[predicate=survivalplus:25chance] Offers.Recipes append value {maxUses:3,buy:{id:emerald,count:15},sell:{id:gold_ingot,count:4,components:{custom_data:{reforgekey:tag},item_name:{"text":"Reforge Token","italic":false,"color":"gold"},lore:[{"text":"Adds a special modifer to equipment","italic":false,"color":"light_purple"},{"text":"Combine on an anvil","italic":false,"color":"gray"}],rarity:rare}}}
execute if score hardmode hardmode matches 1 run data modify entity @s[predicate=survivalplus:25chance] Offers.Recipes append value {maxUses:1,buy:{id:emerald,count:30},sell:{id:armor_stand,components:{custom_data:{dummy:tag},entity_data:{Small:1b,DisabledSlots:4144959,id:"minecraft:armor_stand",Invisible:1b,Tags:[trap,setup,dummy,special]},item_name:"Test Dummy",lore:[{color:"gray",text:"A dummy to test your equipment on",italic:0b},{color:"red",text:"Requires supporting block",italic:0b},{color:"white",text:"Breaking the support will remove the dummy"}]}}}
#execute if score hardmode hardmode matches 1 run data modify entity @s Offers.Recipes append value {maxUses:1,buy:{id:emerald_block,count:10},sell:{id:apple,components:{custom_data:{eatcastlespawn:tag},item_name:{"text":"Spawn Black Castle","italic":false},lore:[{"text":"Can destroy surrounding area","italic":false,"color":"red"},{"text":"-walk far from base","italic":false,"color":"gray"},{"text":"-eat to spawn end game survival+ structure","italic":false,"color":"gray"},{"text":"-place chiseled nether bricks on color blocks outside gate","italic":false,"color":"gray"},{"text":"-place dragon egg on glass above beacon","italic":false,"color":"gray"},{"text":"-fight boss","italic":false,"color":"gray"},"-dont loot blocks, you are meant to be in adventure mode",{"text":"-temporary fix for survival+","italic":false,"color":"gray"}]}}}
execute if score hardmode hardmode matches 1 run data modify entity @s Offers.Recipes append value {maxUses:1,buy:{id:emerald_block,count:10},sell:{id:filled_map,components:{custom_data:{givegatewaymap:tag},item_name:{"text":"Gateway Explorer Map"}}}}
execute if score hardmode hardmode matches 1 run data modify entity @s[predicate=!survivalplus:20chance] Offers.Recipes append value {maxUses:2,buy:{id:emerald,count:23},sell:{id:enchanted_book,components:{custom_data:{dechant:tag},item_name:{"text":"Unchanting Book","italic":false},lore:[{"text":"Extracts enchantments from items","italic":false,"color":"gray"},{"text":"Combine on an Enchanting Table","italic":false,"color":"gray"}]}}}
function survivalplus:merchants/wandering/eggs
execute at @s if biome ~ ~ ~ #survivalplus:is_cold run data modify entity @s Offers.Recipes append value {maxUses:5,buy:{id:emerald,count:4},sell:{id:prismarine_crystals,count:4,components:{item_name:"Cold Berries",rarity:uncommon,consumable:{on_consume_effects:[{type:apply_effects,effects:[{id:slowness,duration:100}]}]},food:{nutrition:2,saturation:1}}}}
execute at @s if biome ~ ~ ~ #minecraft:is_jungle run data modify entity @s Offers.Recipes append value {maxUses:5,buy:{id:emerald,count:4},sell:{id:honeycomb,count:4,components:{item_name:"Honey Berries",rarity:uncommon,consumable:{on_consume_effects:[{type:apply_effects,effects:[{id:speed,duration:100}]}]},food:{nutrition:2,saturation:1}}}}
data modify entity @s[predicate=survivalplus:raining] Offers.Recipes append value {maxUses:1,buy:{id:emerald,count:14},sell:{id:leather_boots,components:{dyed_color:3949738,enchantments:{"survivalplus:flippers":1}}}}
data modify entity @s[predicate=survivalplus:raining] Offers.Recipes append value {maxUses:1,buy:{id:emerald,count:15},sell:{id:leather_chestplate,components:{custom_data:{raincoat:tag},trim:{pattern:raiser,material:gold},dyed_color:16701501,item_name:{"text":"Raincoat","italic":false},lore:[{"text":"+25% Movement speed while wet","italic":false,"color":"gray"}],tooltip_display:{hidden_components:[dyed_color,trim]}}}}
data modify entity @s Offers.Recipes append value {maxUses:4,buy:{id:emerald,count:10},sell:{id:potion,components:{custom_data:{recallpot:tag},potion_contents:{custom_color:712703},custom_name:{"text":"Recall Potion","italic":false},lore:[{"text":"Teleport Home","italic":false,"color":"blue"}],tooltip_display:{hidden_components:[potion_contents]},rarity:rare}}}
data modify entity @s Offers.Recipes append value {maxUses:4,buy:{id:emerald,count:14},sell:{id:potion,components:{custom_data:{randomtp:tag},potion_contents:{custom_color:11862210},custom_name:{"text":"Teleport Potion","italic":false},lore:[{"text":"Teleport somewhere randomly","italic":false,"color":"blue"}],tooltip_display:{hidden_components:[potion_contents]},rarity:rare}}}
data modify entity @s[predicate=!survivalplus:25chance] Offers.Recipes append value {maxUses:4,buy:{id:emerald,count:12},sell:{id:potion,components:{custom_data:{repairpot:tag},potion_contents:{custom_color:3342087},custom_name:{"text":"Bottle of Repair","italic":false,"color":"yellow"},lore:[{"text":"Fully repairs item in opposite hand","italic":false,"color":"blue"},{"text":"Costs 10 levels","italic":false,"color":"red"}],tooltip_display:{hidden_components:[potion_contents]}}}}
execute if score hardmode hardmode matches 1 run data modify entity @s[predicate=survivalplus:25chance] Offers.Recipes append value {maxUses:1,buy:{id:emerald,count:24},sell:{id:goat_horn,components:{custom_data:{raidhorn:tag},instrument:"minecraft:seek_goat_horn",item_name:{"text":"Raid Horn","italic":false},lore:[{"text":"Bad Omen (0:30)","italic":false,"color":"red"},{"text":"Effect stackable","italic":false,"color":"light_purple"}],tooltip_display:{hidden_components:[instrument]},rarity:uncommon}}}
function survivalplus:merchants/wandering/head
function survivalplus:merchants/wandering/cookbook
data modify entity @s Offers.Recipes append value {maxUses:3,buy:{id:emerald,count:20},sell:{id:barrel,components:{container_loot:{loot_table:"survivalplus:gameplay/crates/trader"},item_name:{"text":"Wandering Trader Crate","italic":false},enchantment_glint_override:1b,tooltip_display:{hidden_components:[container_loot]},rarity:uncommon}}}
function survivalplus:merchants/wandering/crates
execute if score hardmode hardmode matches 1 run data modify entity @s[predicate=survivalplus:25chance] Offers.Recipes append value {maxUses:1,buy:{id:nether_star},sell:{id:knowledge_book,components:{custom_data:{dupetome:tag},recipes:["survivalplus:tomes/dupe"],item_name:{"text":"Duplication Tome","italic":false},lore:[{"text":"Duplicates the closest sparkling single item","italic":false,"color":"gray"},{"text":"Excludes Enchantments and Contents","italic":false,"color":"red"}],enchantment_glint_override:1b}}}
function survivalplus:merchants/wandering/tome
#data modify entity @s[predicate=!survivalplus:20chance] Offers.Recipes append value {maxUses:2,buy:{id:emerald,count:14},sell:{id:crossbow,components:{enchantments:{"survivalplus:shotgun":1}}}}
#data modify entity @s[predicate=!survivalplus:20chance] Offers.Recipes append value {maxUses:2,buy:{id:emerald,count:16},sell:{id:crossbow,components:{enchantments:{"survivalplus:velocity":1}}}}
#data modify entity @s[predicate=!survivalplus:20chance] Offers.Recipes append value {maxUses:2,buy:{id:emerald,count:10},sell:{id:bow,components:{enchantments:{"survivalplus:long_shot":1}}}}
function survivalplus:merchants/wandering/shield
execute if score hardmode hardmode matches 1 run function survivalplus:merchants/wandering/flawless

#execute if score hardmode hardmode matches 1 run data modify entity @s Offers.Recipes append value 