This Minecraft tutorial explains how to program a command block to summon a villager to do a custom trade in Minecraft with screenshots and step-by-step instructions.

Let’s explore how to do this.

Required Materials

In Minecraft, these are the required materials to use a command block:

1 Command Block

Program the Command Block

First, you need to program the command block to summon a villager with the /summon command. This /summon command will be run each time the command block is activated.

So, stand in front of the command block with your pointer (the plus sign) on the command block and click on the right mouse button.

This will bring up the programming console for the command block.

Now, type your command in the “Console Command” text box.

Command in Minecraft Java Edition (PC/Mac)

Command in Minecraft Java Edition (PC/Mac) 1.13:

/summon villager ~ ~1 ~ {CustomName:"\"9Minecraft\"",Offers:{Recipes:[{buy:{id:leather,Count:1},sell:{id:bedrock,Count:1},maxUses:9}]}}

Command in Minecraft Java Edition (PC/Mac) 1.11 and 1.12:

/summon villager ~ ~1 ~ {CustomName:9Minecraft,Offers:{Recipes:[{maxUses:9,buy:{id:leather,Count:1},sell:{id:bedrock,Count:1}}]}}

Command in Minecraft Java Edition (PC/Mac) 1.8, 1.9, and 1.10:

/summon Villager ~ ~1 ~ {CustomName:9Minecraft,Offers:{Recipes:[{maxUses:9,buy:{id:leather,Count:1},sell:{id:bedrock,Count:1}}]}}

In this example, we are going to create a villager that is named 9Minecraft. The villager will trade 1 leather for 1 bedrock and you will be able to do this trade a maximum of 9 times.

You can customize this command to make the villager trade whatever you would like.

TIP: See data tags for villager to learn more about the Offers data tag.

For example, replace id:leather with the item id you would like the villager to buy. And replace the id:bedrock value with the item that you would like the villager to sell. See our list of Minecraft IDs.

You can also customize the Count parameter to change the number of items used in the trade. Currently, the command uses Count:1 which indicates that 1 unit of each item is being traded.

Finally, you can customize the maxUses parameter to indicate how many times the villager can do this trade. In this example, we’ve set it to 9.

When you are finished entering the command, click on the Done button.

Activate the Command Block

Now, activate the command block with the redstone device such as a lever, button, or pressure plate. In this example, we are going to use a lever to activate the command block.

When a player pulls the lever, the command block will be activated.

Now you will see a villager summoned that is named 9Minecraft. If you right click on the villager, you will see that it will trade 1 leather for 1 bedrock.

Congratulations, you have learned how to program a command block to summon a villager that will buy and sell what you want it to.

Click to rate this post!
[Total: 2 Average: 5]