Using /summon:
Not too long ago, there was a time when mobs had to be summoned from dispensers of custom spawners made with MC-Edit. But that all changed with the addition with /summon in 1.7.2. Let's take a look at some code.
/summon <EntityName> [x] [y] [z] [dataTag]
This is the syntax for all /summon commands. Start with /summon followed by the name of the entity/mob you want to spawn E.g Pig, Sheep, PrimedTnt; for a full list of entities and their names, go HERE. After the entity's name are the coordinates of the spawn.
Following the coordinates is were some of the more complex command block functions come in; Data Tags. I'll be covering some of the more commonly used tags, but if you want to learn more you can go HERE or HERE.
So let's spawn a basic Pig:
/summon Pig ~ ~1 ~
Following this is where the data tag goes. Let's give the pig a saddle.
/summon Pig ~ ~1 ~ {Saddled:1}
See what happened there? It is very important when using tags that you open and close each tag respectively. The Saddle tag is a boolean value, meaning it is either 1 or 0. What happens if we want the pig to have a custom name as well?
/summon Pig ~ ~1 ~ {Saddled:1,CustomName:"Piggy"}
NOTE: We do not have to make a new set of brackets for every tag, simply separate each tag with a comma.
So there you go! Now you can use /summon to spawn entities with great ease. Before I finish, here is an example of the kind of things you can do with /summon.
Not too long ago, there was a time when mobs had to be summoned from dispensers of custom spawners made with MC-Edit. But that all changed with the addition with /summon in 1.7.2. Let's take a look at some code.
This is the syntax for all /summon commands. Start with /summon followed by the name of the entity/mob you want to spawn E.g Pig, Sheep, PrimedTnt; for a full list of entities and their names, go HERE. After the entity's name are the coordinates of the spawn.
Following the coordinates is were some of the more complex command block functions come in; Data Tags. I'll be covering some of the more commonly used tags, but if you want to learn more you can go HERE or HERE.
So let's spawn a basic Pig:
Following this is where the data tag goes. Let's give the pig a saddle.
/summon Pig ~ ~1 ~ {Saddled:1}See what happened there? It is very important when using tags that you open and close each tag respectively. The Saddle tag is a boolean value, meaning it is either 1 or 0. What happens if we want the pig to have a custom name as well?
/summon Pig ~ ~1 ~ {Saddled:1,CustomName:"Piggy"}NOTE: We do not have to make a new set of brackets for every tag, simply separate each tag with a comma.
So there you go! Now you can use /summon to spawn entities with great ease. Before I finish, here is an example of the kind of things you can do with /summon.
/summon Skeleton -864 59 327 {CustomName:Skeletor,CustomNameVisible:1,SkeletonType:1,Attributes:[{Name:generic.knockbackResistance,Base:1},{Name:generic.movementSpeed,Base:0.001}],DropChances:[0f,0f,0f,0f,1.0f],Equipment:[{id:261,tag:{ench:[{id:48,lvl:1}]}},{id:301,tag:{display:{color:0}}},{id:300,tag:{display:{color:0}}},{id:299,tag:{display:{color:0}}},{id:397,Count:1,Damage:1}]}