Blogs Tutorial

Command Blocks Tutorial

  • 3,631 views • 2 today
  • 3
  • 2
  • 20
ItsRucka
Level 33 : Artisan Pixel Painter
61
This blog is just a list of commands that I've either made, or found.

Scoreboard:
Add Score Board: /scoreboard objectives add name criteria name

Scoreboard Criterias: 
dummy (Score is only changed by commands, and not by game events such as death. This is useful for event flags, state mappings, and currencies.)

trigger (Score is only changed by commands, and not by game events such as death. The /trigger command can be used by a player to set or increment/decrement their own score in an objective with this criteria. The /trigger command will fail if the objective has not been "enabled" for the player using it, and the objective will be disabled for the player after they use the /trigger command on it. Note that the /trigger command can be used by ordinary players even if Cheats are off and they are not an Operator. This is useful for player input via /tellraw interfaces.)

deathCount (Score increments automatically for a player when they die.)

playerKillCount (Score increments automatically for a player when they kill another player.)

totalKillCount (Score increments automatically for a player when they kill another player or a mob.)

health (Ranges from 0 to 20 on a normal player; represents the amount of half-hearts the player has. May appear as 0 for players before their health has changed for the first time. Extra hearts and absorption hearts also count to the health score, meaning that with Attributes/Modifiers or the Health Boost or Absorption Status Effects, health can far surpass 20.)

Example: /scoreboard objectives add  Death deathCount Death (This will create a scoreboard that counts how many times the player has died)

Display Score Board:
/scoreboard objectives setdisplay slot name

Scoreboard Slots:
list (Displays a yellow number without a heading on the tab menu, where online players are shown. Visible even in singleplayer.)

sidebar (Shows on the right hand side of the screen. Shows players in a high score list with a heading labeled the objective's display name. Note that players will be shown even if offline, and untracked players will not be shown. In addition, fake players with names starting with a # will not show up in the sidebar under any circumstances)

belowName (Shows the score followed by the objective's display name below the player's nameplate above their head. Is hidden beyond ~10 blocks and when the player is sneakng. Not visible in singleplayer)

Example: /scoreboard objectives setdisplay sidebar Deaths (This will show how many times each player has died on the side of the screen. Note: You must first have a scoreboard objective named "Death" in order to use the example but, you can change "Death" into what your objective is called.)

Remove An Objective:
/scoreboard objectives remove name

Example: /scoreboard objectives remove Death (This will remove "Death" objective.)

Add Points To Objective Via Command Block
/scoreboard players add @p name 1

Example: /scoreboard players add @p Death 1 (This will add 1 point to "death" to the nearest player.)

Summon:

Summon A Mob:
/summon mob ~ ~ ~

Mob List:
Passive: Chicken, Cow, Horse, Ocelot, Pig, Sheep, Bat, Mooshroom, Squid,and Villager.
Neutral: CaveSpider, Enderman, Spider, Wolf, and ZombiePigman.
Hostile: Blaze, Creeper, Ghast, MagmaCube, Silverfish, Skeleton, Slime, SpiderJockey, Witch, WitherSkeleton, and Zombie.

Example: /summon Zombie ~ ~2 ~ (This will summon a Zombie 2 blocks above the command block.)

Summon A Mob With A Name
/summon Villager ~ ~ ~ {CustomName:"Notch"} 

Summon A Mob That Can't Move
/summon Villager ~ ~2 ~ {Attributes:[{Name:generic.movementSpeed­,Base:0.001}]}

Summon A Mob That Can't Move, And Has A Name
/summon Villager ~ ~ ~ {Attributes:[{Name:generic.movementSpeed,Base:0.001}],CustomName:"ItsRucka"}

Spawn 9 Zombies
/summon Zombie ~2 ~ ~2 {Riding:{id:FallingSand,Riding:{id:Zombie,Riding:{id:FallingSand,Riding:{id:Zombie,Riding:{id:FallingSand,Riding:{id:Zombie,Riding:{id:FallingSand,Riding:{id:Zombie,Riding:{id:FallingSand,Riding:{id:Zombie,Riding:{id:FallingSand,Riding:{id:Zombie,Riding:{id:FallingSand,Riding:{id:Zombie,Riding:{id:FallingSand,Riding:{id:Zombie}}}}}}}}}}}}}}}}}

Spawn Tamed Skeleton Horse
/summon EntityHorse ~0 ~0 ~0 {Type:4, SaddleItem:{id:329}, Tame:1}

Fully diamond armoured enchanted skeleton:
/summon Skeleton ~ ~1 ~ {Equipment:[
{id:261,tag:{ench:{id:50,lvl:1}]}},
{id:313,tag:{ench:[{id:2,lvl:2}]}},
{id:312,tag:{ench:[{id:3,lvl:2}]}},
{id:311,tag:{ench:[{id:7,lvl:2}]}},
{id:310,tag:{ench:[{id:4,lvl:2}]}}],
CustomNameVisible:1,CustomName:"Notch"}

Villager With Custom Trades:
/summon Villager ~ ~1 ~ {Offers:{Recipes:[{maxUses:1,buy:{id:367,Count:2,Damage:0},sell:{id:364,Count:1}},{maxUses:2,buy:{id:367,Count:10,Damage:3},sell:{id:272,Count:1,Damage:3}}]}}

Tellraw:
Notch Talking:
/tellraw @a {text:"<",extra:[{text:"Notch",color:dark_red},{text:"> "},{text:"I love this server!",color:gold}]}

Tellraw Command:
/tellraw @a {text:"CLICK",clickEvent:{action:run_command,value:"/say This is a test"}} (You can change the command to anything.)

Example Tellraw Command:
/tellraw @a {text:"Free Diamonds!",clickEvent:{action:run_command,value:"/summon Creeper ~ ~ ~"}} (When the player clicks "Free Diamonds" a Creeper will be spawned at his/her current position.)

Player Heads:
Custom Player Head:
/give @p 397 1 3 {SkullOwner:"Namehere"}


Example:/give @p 397 1 3 {SkullOwner:"SethBling"} (Will give the player SethBling"s head.)

Playsound:
Play A Sound To The Player:
/playsound sound @a

Sounds:

1 - ambient.cave.[1-13]
2 - ambient.weather.rain[1-4]
3 - ambient.weather.thunder[1-3]
------------------------------------------------
4 - damage.fallbig
5 - damage.fallsmall
6 - damage.hit[1-3]
------------------------------------------------
7 - dig.cloth[1-4]
8 - dig.grass[1-4]
9 - dig.gravel[1-4]
10 - dig.sand[1-4]
11 - dig.snow[1-4]
12 - dig.stone[1-4]
13 - dig.wood[1-4]
-------------------------------------------------
14 - fire.fire
15 - fire.ignite
-------------------------------------------------
16 - fireworks.blast_far1
17 - fireworks.blast1
18 - fireworks.largeBlast_far1
19 - fireworks.largeBlast1
20 - fireworks.launch1
21 - fireworks.twinkle_far1
22 - fireworks.twinkle1
-------------------------------------------------
23 - liquid.lava
24 - liquid.lavapop
25 - liquid.splash[1-2]
26 - liquid.swim[1-4]
27 - liquid.water
-------------------------------------------------
28 - minecart.base
29 - minecart.inside
-------------------------------------------------
30 - mob.bat.death
31 - mob.bat.hurt[1-4]
32 - mob.bat.idle[1-4]
33 - mob.bat.loop
34 - mob.bat.takeoff
-------------------------------------------------
35 - mob.blaze.breathe[1-4]
36 - mob.blaze.death
37 - mob.blaze.hit[1-4]
-------------------------------------------------
38 - mob.cat.hiss[1-3]
39 - mob.cat.hitt[1-3]
40 - mob.cat.meow[1-4]
41 - mob.cat.purr[1-3]
42 - mob.cat.purreow[1-2]
-------------------------------------------------
43 - mob.chicken.hurt[1-2]
44 - mob.chicken.plop
45 - mob.chicken.say[1-3]
46 - mob.chicken.step[1-2]
-------------------------------------------------
47 - mob.cow.hurt[1-3]
48 - mob.cow.say[1-4]
49 - mob.cow.step[1-4]
-------------------------------------------------
50 - mob.creeper.death
51 - mob.creeper.say[1-4]
-------------------------------------------------
52 - mob.enderdragon.end
53 - mob.enderdragon.growl[1-4]
54 - mob.enderdragon.hit[1-4]
55 - mob.enderdragon.wings[1-6]
-------------------------------------------------
56 - mob.endermen.death
57 - mob.endermen.hit[1-4]
58 - mob.endermen.idle[1-5]
59 - mob.endermen.portal[1-2]
60 - mob.endermen.scream[1-4]
61 - mob.endermen.stare
-------------------------------------------------
62 - mob.ghast.affectionate_scream
63 - mob.ghast.charge
64 - mob.ghast.death
65 - mob.ghast.fireball4
66 - mob.ghast.moan[1-7]
67 - mob.ghast.scream[1-5]
-------------------------------------------------
(There are too many horse sounds to list)
-------------------------------------------------
68 - mob.irongolem.death
69 - mob.irongolem.hit[1-4]
70 - mob.irongolem.throw
71 - mob.irongolem.walk[1-4]
-------------------------------------------------
72 - mob.magmacube.big[1-4]
73 - mob.magmacube.jump[1-4]
74 - mob.magmacube.small[1-5]
-------------------------------------------------
75 - mob.pig.death
76 - mob.pig.say[1-3]
77 - mob.pig.step[1-5]
-------------------------------------------------
78 - mob.sheep.say[1-3]
79 - mob.sheep.shear
80 - mob.sheep.step[1-5]
-------------------------------------------------
81 - mob.silverfish.hit[1-3]
82 - mob.silverfish.kill
83 - mob.silverfish.say[1-4]
84 - mob.silverfish.step[1-4]
-------------------------------------------------
85 - mob.skeleton.death
86 - mob.skeleton.hurt[1-4]
87 - mob.skeleton.say[1-3]
88 - mob.skeleton.step[1-4]
-------------------------------------------------
89 - mob.slime.attack[1-2]
90 - mob.slime.big[1-4]
91 - mob.slime.small[1-5]
-------------------------------------------------
92 - mob.spider.death
93 - mob.spider.say[1-4]
94 - mob.spider.step[1-4]
-------------------------------------------------
95 - mob.villager.death
96 - mob.villager.haggle[1-3]
97 - mob.villager.hit[1-4]
98 - mob.villager.idle[1-3]
99 - mob.villager.no[1-3]
100 - mob.villager.yes[1-3]
-------------------------------------------------
101 - mob.wither.death
102 - mob.wither.hurt[1-4]
103 - mob.wither.idle[1-4]
104 - mob.wither.shoot
105 - mob.wither.spawn
-------------------------------------------------
106 - mob.wolf.bark[1-3]
107 - mob.wolf.death
108 - mob.wolf.growl[1-3]
109 - mob.wolf.howl[1-2]
110 - mob.wolf.hurt[1-3]
111 - mob.wolf.panting
112 - mob.wolf.shake
113 - mob.wolf.step[1-5]
114 - mob.wolf.whine
-------------------------------------------------
115 - mob.zombie.death
116 - mob.zombie.hurt[1-2]
117 - mob.zombie.infect
118 - mob.zombie.metal[1-3]
119 - mob.zombie.say[1-3]
120 - mob.zombie.step[1-5]
121 - mob.zombie.remedy
122 - mob.zombie.unfect
123 - mob.zombie.wood[1-4]
124 - mob.zombie.woodbreak
-------------------------------------------------
125 - mob.zombiepig.zpig[1-4]
126 - mob.zombiepig.zpigangry[1-4]
127 - mob.zombiepig.zpigdeath
128 - mob.zombiepig.zpighurt[1-2]
-------------------------------------------------
129 - note.bass
130 - note.bassattack
131 - note.bd
132 - note.harp
133 - note.hat
134 - note.pling
135 - note.snare
-------------------------------------------------
136 - portal.portal
137 - portal.travel
138 - portal.trigger
-------------------------------------------------
139 - random.anvil_break
140 - random.anvil_land
141 - random.anvil_use
142 - random.bow
143 - random.bowhit[1-4]
144 - random.break
145 - random.breath
146 - random.burp
147 - random.chestclosed
148 - random.chestopen
149 - random.classic_hurt
150 - random.click
151 - random.door_close
152 - random.door_open
153 - random.drink
154 - random.eat[1-3]
155 - random.explode[1-4]
156 - random.fizz
157 - random.fuse
158 - random.glass[1-3]
159 - random.levelup
160 - random.orb
161 - random.pop
162 - random.successful_hit
163 - random.wood_click
-------------------------------------------------
164 - step.cloth[1-4]
165 - step.grass[1-6]
166 - step.gravel[1-4]
167 - step.ladder[1-5]
168 - step.sand[1-5]
169 - step.snow[1-4]
170 - step.stone[1-6]
171 - step.wood[1-6]
-------------------------------------------------
172 - tile.piston.in
173 - tile.piston.out

That's all for now, if anyone would like to request a command just ask in the comments!
Tags

  Have something to say?

Frigo103
12/02/2014 11:32 am
Level 25 : Expert System
https://www.youtube.com/watch?v=0cLMrbZ9UNM&list=UUoemiHLebfHjDCXHYcMbaog hey guys I made a video about how to use testfor a named snowball in the active item in inventory to change between commands its a quite usefull tutorial
1
yamatohekatsue
09/03/2014 7:17 pm
Level 1 : New Miner
is there anyway to summon a cavespider skelly where the spider is always agro? even in the day im working on custom map building and this is the command I have so far
/summon Skeleton 0 ~ 0 {SkeletonType:1,AbsorptionAmount:20,Equipment:[{id:261},{},{},{},{}],ActiveEffects:[{Id:14,Amplifier:0,Duration:99999,Ambient:1}],Riding:{id:"Spider",AbsorptionAmount:30,ActiveEffects:[{Id:14,Amplifier:0,Duration:99999,Ambient:1}]}}

when running this command the boss fight is in a dark room and the mob spawns a normal spider jocky with a wither skelly that is invisiable for 99999 ticks or about 416 minuts just to make sure it would stay invis
in the dark room all you see in the shadows are the Bow and the Eyes of the spider the absorbtion on them makes them stronger then normal insted of a few hits to kill with a diamond sword it takes more like 8 per wither skelly and spider

i just need to know what to punch in to make the spider a cave spider so it has the poison bite and always agro so it attacks even if spawned in the day
1
ItsRucka
09/03/2014 9:04 pm
Level 33 : Artisan Pixel Painter
I don't know if that's possible, you would have to just mess around with it.
1
Ninja_TR011
11/02/2014 6:52 am
Level 1 : New Miner
hey itsrucka can you help me how to use the command for /playsound [any mobs sound] plus the radius around the area please.
1
yamatohekatsue
09/04/2014 9:50 am
Level 1 : New Miner
like i said everything else works and i even have a witch that is riding on an invisable bat and it works so i know everything is fine just i dont know the cave spiders code
1
ItsRucka
09/04/2014 6:14 pm
Level 33 : Artisan Pixel Painter
Well, I don't have much expeirience with them either so, you would need to just keep trying until something works, that's what I do
1
yamatohekatsue
09/05/2014 9:19 am
Level 1 : New Miner
kk thanks anyways
1
KPJ1
07/07/2014 5:09 am
Level 22 : Expert Mage
Epic :) Diamond And Sub
1
ItsRucka
07/07/2014 3:55 pm
Level 33 : Artisan Pixel Painter
Thanks! :b
1
TheEpicStef
05/07/2014 1:05 am
Level 1 : New Crafter
Do you know how to make a snowball grenade that does not destroy blocks?
I think that you need to teleport a invisible creeper to the snowball but i do not know te exact commands

Thanks for all your help!
1

Welcome