Help! My datapack doesn't work
Hi, I'm struggling with creating a datapack, and need help figuring out why it doesn't work. The datapack first gives all players a speed boost, then summons an area_effect_cloud, then gives it a value, then adds a trade to a wandering trader's trade list if that value matches another specified value. This is how I did it:
(note: these commands are inside a tick.mcfunction file)
Continue to help posteffect give @a minecraft:speed 1 10 true scoreboard objectives add test dummy summon minecraft:area_effect_cloud ~ ~ ~ {CustomName:"{\"text\":\"NAME1\"}",Duration:10,Particle:"underwater"} scoreboard players set @e[name=NAME1] test 123 execute if score @e[name=NAME1,limit=1] test matches 123 run data modify entity @s Offers.Recipes prepend value {buy:{id:"minecraft:bucket",Count:1b},sell:{id:"minecraft:emerald",Count:5b}}
Problem is, the trade isn't added, but I still receive the speed effect. What have i done wrong?