So lately I've been working on a minigame map with command blocks and I wanted to create a villager shop. However when I set up some custom trades whenever you traded with him it unlocked new random trades, I don't want this to happen is there a way to prevent this? (Btw I know this similar has been asked before however the answers didn't quite help me so I decide to ask it myself :D )

  • Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins! – Frank Sep 9 '17 at 14:22
  • Why did the answers not help you? What results do you get when you try them? – Fabian Röling Sep 9 '17 at 16:19
  • Some of them were super outdated and some were kinda irrelevant. – Pixel Stav Sep 9 '17 at 16:22

As an example, let's say you have this command to spawn a villager:

/summon Villager ~1 ~ ~ {Profession:0,Career:1,Offers:{Recipes:[{buy:{id:"dirt",Count:1},maxUses:9999999,sell:{id:"dirt",Count:2}}]}}

This is a basic command. He will sell 1 dirt for 2 dirt. If you want a villager to not unlocks new trades, you set the CareerLevel higher than its maximum.

The command should look like this now:

/summon Villager ~1 ~ ~ {Profession:0,Career:1,CareerLevel:100,Offers:{Recipes:[{buy:{id:"dirt",Count:1},maxUses:9999999,sell:{id:"dirt",Count:2}}]}}

By setting the CareerLevel to 100, and by having Career set to a value higher than 0 (where a value of 1 works for all professions), we prevented the villager from unlocking new trades upon trading.

|improve this answer|||||

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.