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:
    19
    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
    Flareon73 and Tacosbefriends like this.
  2. LilNugget

    LilNugget Helper Staff Member Helper

    Joined:
    Jun 21, 2016
    Messages:
    626
    Likes Received:
    456
    Trophy Points:
    63
    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:
    19
    Trophy Points:
    18
    Gender:
    Male
    Location:
    Canada
    Home Page:
    ?
     
  5. Tacosbefriends

    Tacosbefriends Admin Staff Member Administrator

    Joined:
    Jan 13, 2014
    Messages:
    6,361
    Likes Received:
    6,734
    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_ Member

    Joined:
    Jul 16, 2016
    Messages:
    1,319
    Likes Received:
    700
    Trophy Points:
    113
    Gender:
    Male
    Occupation:
    Playing on Cubecraft
    Location:
    A nest filled with Dogs and Hawks
    Home Page:
    Thanks, this will help :p
     
    Dan9erTheGamer likes this.
  7. Flareon73

    Flareon73 Member

    Joined:
    Jul 1, 2016
    Messages:
    132
    Likes Received:
    20
    Trophy Points:
    18
    Gender:
    Male
    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. A Christmas Hangar

    A Christmas Hangar Member

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

    Anmazing Helper Staff Member Helper

    Joined:
    Aug 7, 2014
    Messages:
    1,349
    Likes Received:
    1,166
    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.