Minecraft PC IP: play.cubecraft.net
Status
Not open for further replies.

Dan9erTheGamer

Well-Known Member
Jan 3, 2016
124
23
93
Canada
d9r.weebly.com
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.
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}
Huh????? That's confusing. What does it even mean?

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:

TheBossFighter_

Well-Known Member
May 31, 2016
90
16
83
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.
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}
Huh????? That's confusing. What does it even mean?

And now, the code dissected!
Code:
/summon Villager ~ ~1 ~ {
  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 3
            {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/
any version @_@
 

Tacosbefriends

Forum Professional
Jan 13, 2014
4,819
9,945
629
Breakfast for Dinner Club HQ
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.
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}
Huh????? That's confusing. What does it even mean?

And now, the code dissected!
Code:
/summon Villager ~ ~1 ~ {
  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 3
            {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/
Neat! I posted my very own custom villager about 2 years ago here. Your guide looks more updated though. Nice!
 
  • Like
Reactions: Dan9erTheGamer

The Crowbar

Well-Known Member
Jul 1, 2016
333
85
103
34
Proxima Centauri, Milky Way
I don't get any of this what so ever. o,O
I do because I'm studying coding, the left side is the code you type in, and the right (after the parenthesis) is NOT code. It is an explanation of what the code is. HOWEVER, if you type that in, it is not going to change anything, because your computer won't read the words after the parenthesis, all you have to do to end the parenthesis "comment" as programmers call it, is press enter and start another line.

The rest is simple. You type in what the left says and change up some bits in the middle to change your trades.
 

DrHam

Forum Veteran
Sep 15, 2015
3,615
4,166
518
Kepler-452b
I do because I'm studying coding, the left side is the code you type in, and the right (after the parenthesis) is NOT code. It is an explanation of what the code is. HOWEVER, if you type that in, it is not going to change anything, because your computer won't read the words after the parenthesis, all you have to do to end the parenthesis "comment" as programmers call it, is press enter and start another line.
Do you really a paragraph to explain the comments? xP
 
Status
Not open for further replies.
Members Online

Team online

Latest profile posts

Floraljackp14 wrote on maoawa's profile.
Beautiful profile picture!
Daily Question 132.

What time do I post my daily questions in your time zone?
Centuria wrote on TC XD's profile.
Happy birthday and thank you! 💖
Zawuri wrote on TC XD's profile.
Happy birthday!
envyvturban wrote on Hazard's profile.
Yo we should play sometime
Top Bottom