3

I'm making a survival map, and now i'd like to add some custom villagers in a tower that can sell custom potions.

For example let's say you have a librarian, and he offers you a potion called: "Potion of Strengh"

That potion would give the player strengh 4, and it would have a duration of 60 sec.

I have tried to use 2 generators witin one site, and I used this following command:

/summon Villager ~1 ~ ~ {Profession:1,CustomName:"The First Wizard",CustomNameVisible:1,Career:1,CareerLevel:42,CanPickUpLoot:0,PersistenceRequired:1,Silent:1,Invulnerable:1,Attributes:[{Name:"generic.movementSpeed",Base:"0f"}],Offers:{Recipes:[{buy:{id:"emerald",Count:1},maxUses:9999999,sell:{id:"potion 1 0 {CustomPotionEffects:[{Id:5,Amplifier:5,Duration:600}],display:{Name:"Super Potion"}}",Count:1},rewardExp:false}]}}

But I only get within a message within the previous output that says:

[14:01:07] Data tag parsing failed: Unexpected token 'S' at: Super Potion"}}",Count:1

And keep in mind I used two generators from this website here to make the command.

2

Now I'm not a genius when it comes to command blocks so I can't tell you what is wrong but I remade your command and tested it in 1.9.2 (which worked) and by comparing my command and your command there is some differences.

/summon Villager ~ ~1 ~ {CustomName:"The First Wizard",CustomNameVisible:1,Profession:1,Career:1,CareerLevel:42,Offers:{Recipes:[{rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:emerald,Count:1},sell:{id:potion,Count:1,tag:{display:{Name:"Super Potion"},CustomPotionEffects:[{Id:5,Amplifier:5,Duration:600}]}}}]},Attributes:[{Name:generic.movementSpeed,Base:0}],Invulnerable:1,PersistenceRequired:1,Silent:1}

The generator I made this with is

http://mcstacker.bimbimma.com/

It might be a bit confusing at first but it helps me make several of my commands. It even gives a description for all/most of the options it gives.

Hopes this helps!

  • Id like to thank you Lethality for telling me avout the generator you used, It has really helped me alot. – Palestina Apr 21 '16 at 8:15
  • @Lethality No problem! I have checkmarked your informative answer, I just have to say thank you to you again. You really helped me off a sticky situation :) – Palestina Apr 22 '16 at 5:21

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.