Can you still make a custom villager that sells custom potions? Java 1.16.2

I'm trying to figure out if you can still create custom villagers that sell custom potions such as speed 10.

/summon villager ~ ~1 ~ {Offers:{Recipes:[{buy:{id:acacia_planks,Count:1},sell:{id:potion,Count:1,tag:{Potion:"minecraft:water",CustomPotionEffect:[{Id:3,Amplifier:2,Duration:180}]}}}]}}

The villager spawns however, the trade is just a water bottle with no potion effect.


Solution 1:

CustomPotionEffect is not a valid NBT tag. The correct name is CustomPotionEffects.

Fixed command:

/summon villager ~ ~ ~ {Offers: {Recipes: [{buyB: {id: "minecraft:air", Count: 0b}, buy: {id: "minecraft:acacia_planks", Count: 1b}, sell: {id: "minecraft:potion", Count: 1b, tag: {Potion: "minecraft:water", CustomPotionEffects: [{Duration: 180, Id: 3b, Amplifier: 2b}]}}}]},VillagerData:{profession:"minecraft:farmer",level:1}}

You must provide a villager profession to be able to trade with the villager.