Minecraft Blogs / Tutorial

Custom Villager Shop

  • 3,683 views, 4 today
  • 6
  • 4
  • 6
Wombatlord's Avatar Wombatlord
Level 13 : Journeyman Engineer
4
To start off we need to enter
/summon Villager ~ 1 ~ ~ {
This is the first line of the command. It just says to summon one villager.

Then we need to choose the profession.
Farmer
Custom Villager Shop
Librarian
Custom Villager Shop
Priest
Custom Villager Shop
Butcher

Blacksmith

Now choose one. The one you choose will have a different number: (SEE BELOW)

Farmer
/summon Villager ~ 1 ~ ~ {
Profession: 0,

Librarian
/summon Villager ~ 1 ~ ~ {
Profession: 1,

Priest
/summon Villager ~ 1 ~ ~ {
Profession: 2,

Blacksmith
/summon Villager ~ 1 ~ ~ {
Profession: 3,

Butcher
/summon Villager ~ 1 ~ ~ {
Profession: 4,

Now we need to name it something!

/summon Villager ~ 1 ~ ~ {
Profession: 0,
CustomName: "Villager_Name"
CustomNameVisible:1,
Career: 1,
CareerLevel: 42,
CanPickUpLoot: 0,
PersistanceRequired: 1,

Now to do the hard part,
/summon Villager ~1 ~ ~ {
Profession: 0,
CustomName: "Villager Name",
CustomNameVisible: 1,
Career: 1,
CareerLevel: 42,
CanPickUpLoot: 0,
PersistenceRequired: 1,
Silent: 1,
Invulnerable: 1,
Attributes: [
{
Name: "generic.knockbackResistance",
Base: "1f"
},
{
Name: "generic.movementSpeed",
Base: "0f"
}
],
Offers: {
Recipes: [
{
buy: {
id: "planks",
Count: 1,
Damage: 3
},
maxUses: 9999999,
sell: {
id: "stone",
Count: 1
},
rewardExp: false
}
]
}
}

This part is the deal you want to make with the villager
Offers: {
Recipes: [
{
buy: {
id: "planks",
Count: 1,
Damage: 3
},
maxUses: 9999999,
sell: {
id: "stone",
Count: 1
},
rewardExp: false
}
]
}
}
This on the left is saying you can trade 1 wood
for 1 stone

and it can be used 9999999




Now we're done! :D

This is MY finished product
/summon Villager ~1 ~ ~ {
Profession: 0,
CustomName: "Villager Name",
CustomNameVisible: 1,
Career: 1,
CareerLevel: 42,
CanPickUpLoot: 0,
PersistenceRequired: 1,
Silent: 1,
Invulnerable: 1,
Attributes: [
{
Name: "generic.knockbackResistance",
Base: "1f"
},
{
Name: "generic.movementSpeed",
Base: "0f"
}
],
Offers: {
Recipes: [
{
buy: {
id: "planks",
Count: 1,
Damage: 3
},
maxUses: 9999999,
sell: {
id: "stone",
Count: 1
},
rewardExp: false
}
]
}
}
If you want custom items
Guided
/summon Villager ~1 ~ ~ {
Profession: 0,
CustomName: "Test",
CustomNameVisible: 1,
Career: 1,
CareerLevel: 42,
CanPickUpLoot: 0,
PersistenceRequired: 1,
Silent: 1,
Invulnerable: 1,
Attributes: [
{
Name: "generic.knockbackResistance",
Base: "1f"
},
{
Name: "generic.movementSpeed",
Base: "0f"
}
],
Offers: {
Recipes: [
{
buy: {
id: "gold_nugget", -what your item is
Count: 10, -amount needed
tag: {
display: {
Name: "Minefield Tokens!", -name
Lore:
"10 MF Tokens_", -description line 1
"1 xp" - description line 2
]
}
}
},
maxUses: 9999999,
sell: {
id: "gold_ingot", -item type
Count: 1, -amount
tag: {
display: {
Name: "xp", - name
Lore: [
"This item is used to unlock areas in the park!" -description line 1
]
}
},
MaxUses: 9999999
},
rewardExp: false
}
]
}
}
Command
/summon Villager ~1 ~ ~ {
Profession: 0,
CustomName: "Test",
CustomNameVisible: 1,
Career: 1,
CareerLevel: 42,
CanPickUpLoot: 0,
PersistenceRequired: 1,
Silent: 1,
Invulnerable: 1,
Attributes: [
{
Name: "generic.knockbackResistance",
Base: "1f"
},
{
Name: "generic.movementSpeed",
Base: "0f"
}
],
Offers: {
Recipes: [
{
buy: {
id: "gold_nugget",
Count: 10,
tag: {
display: {
Name: "Minefield Tokens!",
Lore:
"10 MF Tokens_",
"1 xp"
]
}
}
},
maxUses: 9999999,
sell: {
id: "gold_ingot",
Count: 1,
tag: {
display: {
Name: "xp",
Lore: [
"This item is used to unlock areas in the park!"
]
}
},
MaxUses: 9999999
},
rewardExp: false
}
]
}
}

CreditAll the images, https://minecraftcommand.science/
Tags

1 Update Logs

Update #1 Custom Items : by Wombatlord 10/07/2016 4:25:37 pmOct 7th, 2016

Added tutorial on trading custom items!

Create an account or sign in to comment.

1
10/07/2016 1:39 am
Level 42 : Master Lumberjack
Mushrom Brother
Mushrom Brother's Avatar
A very helpful tutorial for those making custom maps or such. This was a helpful tutorial and I think it deserves more attention :)
1
10/07/2016 2:50 am
Level 13 : Journeyman Engineer
Wombatlord
Wombatlord's Avatar
Thankyou :D
1
10/02/2016 10:54 pm
Level 64 : High Grandmaster Technomancer
flashteens
flashteens's Avatar
Nice tutorial :)

By the way, I have posted a similar tutorial before about making a custom villager shopkeeper:
http://www.planetminecraft.com/blog/tutorial-spawning-a-custom-shopkeeper-in-vanilla-minecraft/

But, there are some small differences in my command:
  1. To prevent the villager from being killed, I used Invulnerable:1 instead of Attributes:[{Name:"generic.knockbackResistance",Base: "1f"}] inside the command. By doing so, there's no way to kill the villager in Survival/Adventure modes, but you may still do so in Creative mode.
  2. The villager wears a custom player's head, which is determined by the tag value of ArmorItems.
  3. Try the tag buyB, so that the player may have to give the villager 2 different items before getting what the villager sells.
P. S. Have you checked out 1.11 yet? There's a new type of villager with green clothes, where you may specify with Profession:5 in your command! ;)
1
10/02/2016 11:11 pm
Level 13 : Journeyman Engineer
Wombatlord
Wombatlord's Avatar
Thanks for the tips! ;) xD
1
10/02/2016 11:13 pm
Level 64 : High Grandmaster Technomancer
flashteens
flashteens's Avatar
You're welcome :)
1
09/28/2016 4:38 pm
Level 1 : New Miner
sullyrox403MINECRAFT
sullyrox403MINECRAFT's Avatar
Nice :D
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome