Current location - Training Enrollment Network - Books and materials - My World 1.7.2 How to use the command box to summon the command box of designated villagers?
My World 1.7.2 How to use the command box to summon the command box of designated villagers?
First of all, I copied these online. I don't steal answers. My world brushes villagers with custom transactions. Today, I will teach you how to use the command box to brush a villager-defined transaction, and use/summon to add NBT. You can trade multiple items at the same time, and you can also customize the number of transactions.

As you can see, not only ordinary items, but also items with custom enchantments and names can be sold.

Enter the tutorial. The first thing to learn is how to draw a villager. This is very simple, and the instructions are:

Summon the villagers ~ ~ 1 ~

After typing this command in the command box and activating it, an ordinary villager will be brushed out. The trading items are random, because I haven't joined any NBT yet. I won't say much about the basis of/summoning instructions, just go to NBT. First of all, there are six kinds of villagers: librarians, butchers, blacksmiths, farmers and priests. There is also a villager who has never used MC, so naturally he will not be brushed out. The first is to teach you how to brush out different kinds of villagers. The type of villagers is not very interesting, but I think it's just a matter of beauty. Description:

Summon the villagers ~ ~ 1 ~

{Occupation: 1}

You can see that the first line is the same as the previous instruction, which is to brush out a villager. The first NBT: {professor} appears on the second line. This profession means category. As you can see, I wrote 1 at the back, which is the ID of the villagers. Write different ids and brush out different kinds of villagers.

List of villagers' ID cards:

0- Villagers (farmer's name, brown coat)

1- Villagers (librarian, white coat)

2- Villagers (father, purple coat)

3- Villagers (Blacksmith, Black Cloak)

4- Villagers (Butcher, White Cloak)

5- Villagers (default villagers, green coat)

It should be noted that ID5, the default villager, will not be brushed out naturally in the game, but only the command box. So after knowing the ID, you can brush out the type of villagers. There are also exquisite types, and each type of villagers sells different things, but after everyone can customize the transaction, the type is not important. My World wiki has screenshots of various villagers:

Next, let's talk about custom trading instructions. This instruction is more complicated because it includes some NBTs, which control: the number of transactions, the items purchased, the items sold and the quantity. Description:

/Summon the villagers ~ ~ 1 ~

{quotation: {recipe: [{maxuses: 999999, purchase: {id:264, Count: 1}, sale: {id:267, Count: 1 }]}}

As you can see, there is no previous occupation in this instruction, because the occupation does not need to be written. If you don't write, the command box will brush out farmers and villagers by itself. So let's talk about this instruction of NBT:

Offer: Customize the meaning of the transaction. If you need to brush custom transaction villagers, you must write this.

Recipe: the meaning of trading method, which is also to be written. What is the trading method behind maxUses?

MaxUses: the number of custom transactions. If you write 1, the villagers will trade items once. I wrote 999, and I can trade indefinitely.

Buy: villagers buy things, that is, what players need to give to villagers. The id and count at the back are related to this item. ID is the project id and Count is the transaction quantity.

Sale: items sold by villagers, that is, items obtained by players. Like buy, ID is the product id and Count is the quantity.

Therefore, my above instructions mean: exchange a diamond for an iron sword, you can trade 9999999 times:

If you put this command in the command box to activate it, the effect is the same. After that, some players will ask: How to make a villager trade multiple items? This is also very simple. Once an item can be traded, the rest is simple, because most of them are repeated instructions. For example:

/Summon the villagers ~ ~ 1 ~

{quotation: {menu: [{maxuses: 999999, purchase: {id:264, count: 1}, sale: {id:267, count: 1}},

{maxUses:9999999, buy: {id:33 1, count: 1}, sell: {id:98, count: 1, damage: 3}},

{maxUses:9999999, buy: {id: 103, count: 1}, sell: {id:86, count: 1}},

{maxUses:9999999, buy: {id:80, count: 1}, sell: {id:79, count: 1 }]}}

As you can see, although this instruction is very long, most of it is repetitive, and the format is exactly the same as just now.