1

How do you make command blocks work?

R_B98's Avatar R_B9812/24/12 7:48 pm
1 emeralds 3.3k 7
12/26/2012 12:18 pm
RedstoneMastR's Avatar RedstoneMastR
Hey first off how do you make the command blocks be activated I can't get them to work I don't know if I'm using the wrong command or what also what I'm trying to do is first off make the block say something and then a different one take Xp away if the click it's button then they recieve an item from it. Can anyone tell me how to do this?
Posted by R_B98's Avatar
R_B98
Level 10 : Journeyman Crafter
10

Create an account or sign in to comment.

7

1
12/24/2012 7:59 pm
Level 50 : Grandmaster Modder
Goblom
Goblom's Avatar
if you are on a server you need to edit the server.properties to have "enable-command-block=true" without the quotes. Once you have that you should be able to use command blocks. To edit the command in the command block you need op'd and in creative. The command blocks will understand any command that has been added by bukkit or mod in vanilla.

To obtain a command block do /give <playerName> 137 1

To use a command block hook up a redstone line to a button/lever and type whatever command you want to command block to do in the command block to push the button or pull the lever and the command will send the command that you put in it.

As for giving players items the command you would use is /give @p <itemID> <amount>
1
12/24/2012 7:57 pm
Level 20 : Expert Nerd
Idiotonastic
Idiotonastic's Avatar
Click to reveal
The Command Block will execute server commands like giving items or experience to a player.[1]
To change the command executed by the block, simply right-click it, and a GUI will open.
In place of player names, it is possible to use multiple different shorthands:
Shorthand Function
@p Nearest player
@r Random player
@a All players
When using commands, treat them as if entered from the console - you always need to specify the target, so it is not possible to use commands such as "kill" which do not take a player argument. For example, to change the mode to Survival for the nearest player type: /gamemode survival @p. Note that you will have to be in Creative mode to change the command associated with the block..
[edit]Gamerules

As of version 12w32a a new /gamerule command has been added.
Usage: /gamerule <gamerule> <true/false>
Gamerule What it does
commandBlockOutput Enables/disables text output of command block commands to console
doFireTick Enables/disables fire spread
doMobLoot Enables/disables mob drops
doMobSpawning Enables/disables the spawning of mobs unless you want them to ex: eggs will still spawn mobs
doTileDrops Enables/disables blocks dropping items when broken (includes TNT destroying blocks)
keepInventory Enables/disables keeping inventory on death
mobGriefing Enables/disables creepers, ghasts, and Wither blowing up blocks, endermen picking up blocks and zombies breaking doors

Disabled commands

The following commands have been disabled for use with the Command Block.
Command Reason for being disabled
/kick Due to @a, this could be used to lock out a server from entries.
/ban
/op So players cannot OP themselves.
/deop So players cannot deop OPs.
/stop So players cannot shut down a server.
However, the /me command still works and allows broadcasting of server-wide messages. The Command block itself is then represented by the "at sign" (@). Additionally, it's worth noting that the "/me" command normally needs a player context to work, but it works flawlessly with the Command block nonetheless.

Arguments

After using a target (@a) you can optionally use arguments. This is how you use the arguments: @<selector>[<argument>=<value>,<argument>=<value>]
Argument Function
x X coordinate for the search center.
y Y coordinate for the search center.
z Z coordinate for the search center.
r Maximum search radius.
rm Minimum search radius.
m A player's gamemode.
c Number of players. If negative, uses players from the end of the list first.
l Maximum level of players.
lm Minimum level of players.
Example: @p[x=1,y=30,z=26,r=10,rm=2,m=1,c=3,l=25,lm=3]
Alternatively, the coordinates and maximum (but not minimum!) radius can be provided more concisely as long as they're the first (up to four) arguments without keys, for instance:
@p[1,30,26,10,rm=2,m=1,c=3,l=25,lm=3]
is identical to the previous example.
Because the argument 'c' uses players from the end of a list first when negative, @p[c=-1] may be used to select the farthest player instead of the nearest one.


Source Wiki

Basically you need to be OP and you type in the commands you want it to execute form the list above with an argument for when you want to execute it.

Hope it helped.

~Idiotonastic
1
12/24/2012 8:00 pm
Level 10 : Journeyman Crafter
R_B98
R_B98's Avatar
Ok thank you so much this was very helpful I was typing the command wrong
1
12/26/2012 12:18 pm
Level 16 : Journeyman Dragon
RedstoneMastR
RedstoneMastR's Avatar
Edit the Server.properties file and change enable-commandblocks=false to true.
1
12/24/2012 7:52 pm
Level 1 : New Miner
littlefouts
littlefouts's Avatar
yeah me to having the same problem and youtube doesnt help
1
12/24/2012 7:51 pm
Level 46 : Master Pixel Puncher
Im_feeling_UnLuCky
Im_feeling_UnLuCky's Avatar
Youtube it maybe -.- fastest tutorial possible
1
12/24/2012 7:53 pm
Level 10 : Journeyman Crafter
R_B98
R_B98's Avatar
I did and it came up with nothing I'll serch again though maybe my computer was being derpy
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome