1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Dissecting A Custom Villager Command

Discussion in 'Plugins/Codes' started by Dan9erTheGamer, Aug 6, 2016.

Thread Status:
Not open for further replies.
  1. Dan9erTheGamer

    Dan9erTheGamer Member

    Joined:
    Jan 3, 2016
    Messages:
    124
    Likes Received:
    20
    Trophy Points:
    18
    Gender:
    Male
    Location:
    Canada
    Home Page:
    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: Aug 12, 2016
    The Crowbar and Tacosbefriends like this.
  2. LilNugget

    LilNugget Member

    Joined:
    Jun 21, 2016
    Messages:
    626
    Likes Received:
    508
    Trophy Points:
    93
    Gender:
    Male
    Location:
    McDonalds
    I don't get any of this what so ever. o,O
     
  3. TheBossFighter_

    TheBossFighter_ Member

    Joined:
    May 31, 2016
    Messages:
    90
    Likes Received:
    15
    Trophy Points:
    8
    Gender:
    Male
    any version @_@
     
  4. Dan9erTheGamer

    Dan9erTheGamer Member

    Joined:
    Jan 3, 2016
    Messages:
    124
    Likes Received:
    20
    Trophy Points:
    18
    Gender:
    Male
    Location:
    Canada
    Home Page:
    ?
     
  5. Tacosbefriends

    Tacosbefriends Admin Staff Member Administrator

    Joined:
    Jan 13, 2014
    Messages:
    6,470
    Likes Received:
    7,768
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    Snarky Internet Man
    Location:
    My Computer Desk
    Home Page:
    Neat! I posted my very own custom villager about 2 years ago here. Your guide looks more updated though. Nice!
     
    Dan9erTheGamer likes this.
  6. 1212hawks_

    1212hawks_ Helper Staff Member Helper

    Joined:
    Jul 16, 2016
    Messages:
    1,644
    Likes Received:
    1,438
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    Listening to memes and other weird things
    Location:
    The nest.
    Home Page:
    Thanks, this will help :p
     
    Dan9erTheGamer likes this.
  7. The Crowbar

    The Crowbar Member

    Joined:
    Jul 1, 2016
    Messages:
    332
    Likes Received:
    85
    Trophy Points:
    28
    Gender:
    Male
    Occupation:
    CubeCraft Player
    Location:
    Proxima Centauri, Milky Way
    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.
     
  8. HangarGeek

    HangarGeek Member

    Joined:
    Sep 15, 2015
    Messages:
    2,667
    Likes Received:
    1,641
    Trophy Points:
    113
    Gender:
    Male
    Location:
    Kepler452B
    Home Page:
    Do you really a paragraph to explain the comments? xP
     
  9. Anmazing

    Anmazing Mod Staff Member Moderator

    Joined:
    Aug 7, 2014
    Messages:
    1,412
    Likes Received:
    1,414
    Trophy Points:
    113
    Gender:
    Male
    Please do not reply to threads older than 2 weeks. @The Crowbar
    ~Locked
     
Thread Status:
Not open for further replies.