Minecraft – Custom Villager with potions as trade

minecraft-commandsminecraft-java-edition

So I'm trying to make a custom trade villager with potions as one of the trades. But I can't seem to figure out what to put in the command block.

What I've got so far is:

sell:{id:"minecraft:potion",Count:1}}

Can someone help me with this command?

I'm playing on version 1.9

Best Answer

In 1.9, potions no longer rely on the damage value of the potion item to determine what type of default potion it is. Instead, the Potion string tag holds a string-based default potion ID, which is stored in the tag compound:

sell:{id:"minecraft:potion",Count:1,tag:{Potion:"minecraft:strength"}}}

If instead you want to sell a potion with custom effects, you would use the old CustomPotionEffects list (using an effect ID):

sell:{id:"minecraft:potion",Count:1,tag:{CustomPotionEffects:[{Id:5,Duration:600}]}}}