1

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.

5
  • 2
    What have you tried? – fasterthanlight Aug 26 '20 at 15:01
  • I updated my post to include the command I'm working with. – John Snow Aug 26 '20 at 15:34
  • 2
    So, what's wrong with that command? Does the villager fail to summon? Does the vilager have default trades? Does the sold potion not have any effects? Something else? – pppery Aug 26 '20 at 15:43
  • The villager spawns however, the trade is just a water bottle with no potion effect. – John Snow Aug 26 '20 at 15:52
  • 1
    Please only include the bare basics needed to reproduce your problem. For example, the VillagerData tag has nothing to do with the fact potions are not working. Next time, please be sure to provide a minimal reproducible example. I've edited your command so that it is the bare basics of what is needed to solve the problem. – ExpertCoder14 Aug 26 '20 at 16:45
2

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.

3
  • Wait... If the buy tag is like that, then would it be possible for both buy items be air or Count be 0, making it free? – fasterthanlight Aug 26 '20 at 17:00
  • So if we set the price to 0, what would happen? – fasterthanlight Aug 26 '20 at 17:23
  • So that would still make the trade impossible. – fasterthanlight Aug 26 '20 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.