Hi! This will be the first part of a new series on the forums, called Dissecting Commands! Here I will take super long commands and format them so they become understandable.
First off, a command that makes a custom villager.
Huh????? That's confusing. What does it even mean?
And now, the code dissected!
Very special thanks, best tool for making one-command-creations: http://commandstudio.github.io/commandstudio/
First off, a command that makes a custom villager.
Code:
/summon Villager ~ ~1 ~ {CustomName:The Vicar,Visible:1,ActiveEffects:[{Id:25,Amplifier:0,Duration:999999}],Invulnerable:1,PersistenceRequired:1,NoAI:1,Offers:{Recipes:[{buy:{id:diamond_sword,Count:1,},buyB:{id:experience_bottle,Count:64},sell:{id:diamond_sword,Count:1,tag:{ench:[{id:16,lvl:4},{id:20,lvl:2},{id:34,lvl:3},{id:70,lvl:1}]}},rewardExp:false,maxUses:1}]},Profession:2,Career:1,CareerLevel:3}
And now, the code dissected!
Code:
/summon Villager ~ ~1 ~ { // spawning location
CustomName:The Vicar, // name tag
Visible:1,
ActiveEffects:[{ // potion effects
Id:25, // Levatation
Amplifier:0, // effect level
Duration:999999 // "forever"
}],
Invulnerable:1, // cannot kill in survival
PersistenceRequired:1, // will not despawn
NoAI:1, // cannot move, no mob AI
Offers:{ // trades
Recipes:[{
buy:{ // first slot
id:diamond_sword, // Diamond Sword (duh)
Count:1,
},
buyB:{ // second slot
id:experience_bottle, // Bottle O' Enchanting
Count:64
},
sell:{ // third slot
id:diamond_sword, // Diamond Sword with enchants (see below)
Count:1,
tag:{
ench:[
{id:16,lvl:4}, // Sharpness IV
{id:20,lvl:2}, // Fire Aspect II
{id:34,lvl:3}, // Unbreaking III
{id:70,lvl:1} // Mending
]
}
},
rewardExp:false, // do not give exp on trade
maxUses:1 // trade can only be used once
}
]},
// these define the villager's job. right now this guy is a Cleric (Purple Robes)
Profession:2,
Career:1,
CareerLevel:3
}
Very special thanks, best tool for making one-command-creations: http://commandstudio.github.io/commandstudio/
Last edited: