Talk:Command Block/Archive 1

Name?
The command block has been hinted at for being released in the creative inventory in update 1.5.1 ace25ace 10:26, 6 January 2013 (eastern time)

It should be called the Command Firer, or something. :) Sonickyle 20:56, 4 August 2012 (UTC)

This is not the forums! Noobnathan 21:32, 30 August 2012 (UTC)

Teleportation
It will FINALLY be possible with this block. YES! Xeoxer 13:09, 5 August 2012 (UTC)

Is it just me, or do some command block teleportations teleport players one block away from the real coordinates? Willco2 20:45, 14 October 2012 (UTC)

this is because commands using coordinates (eg. "/tp" or "/spawnpoint") add 0.5 to integers, like usual. To clarify, the number -33 would be interpreted as -32.5, and the number 187 would be interpreted as 187.5. -taken from command block page.

Is there any way to teleport to a player's spawnpoint? Aaronfranke 01:57, 6 February 2013 (UTC)

smp option
yeah what is the name of the command to enable/disable command blocks in smp (cause my server was created in 1.3.1) thank you if you answer Riothegod 03:44, 11 August 2012 (UTC)

Some commands with the command block
Here are some commands I'v seen used with the command block which could be included into the main page at some point.

Note that refers to either @p, @r or @a.

Updated: 01:37, 13 August 2012 (UTC)

I'll expand if I see more. NeedAGoodUsername 01:10, 13 August 2012 (UTC)

For everyone using teleportation, the teleported area must be a valid spot and not "inside" a block. 184.163.43.21 19:20, 15 August 2012 (UTC)

I can't use @p, @r, or @a in a say command to show the player(s) names w/o spaces on both sides. Here's an example: Working: /say Thanks, @p. Not Working: /say Thanks, @p. I don't know if there's a problem with my PC, or if others are having this same problem. 71.203.64.195 16:48, 5 June 2013 (UTC)

Mod commands
If there's any mods for 12w32a, or future updates, I think it would be good trivia as to whether or not commands added by mods (ex: SPC, SMP Bukkit plugins) would work with the command blocks. This would let map makers know if they can use commands from their mods such as Worldedit in use of adventure maps, or if they can't, as well as say a mod is needed to play an adventure map to its full potential as structured. Funky3000 03:16, 13 August 2012 (UTC)


 * That info belongs on the individual mods' pages, not here. 「 ディノ 奴 千？！ 」? · ☎ Dinoguy1000 03:53, 13 August 2012 (UTC)


 * I'm not talking each individual mod. I'm wondering if the command block can actually use mod commands in general. Not talking specifics, those couple were just examples. There are many mods out there that add commands, it would be good trivia to know if the command block can only use vanilla commands or not be able to use "chocolate" commands. This is also a good place for such generalized information, it only involves commands and besides, wouldn't want to crash the game, would we? ;) Or worse, be the cause of a crash because we didn't put information where it is centered upon AKA use of command blocks? Funky3000 04:30, 13 August 2012 (UTC)


 * That would probably be a question for Jeb, then; in particular, the block may not support mod commands as added by current versions of mods, but a method for adding such commands may be a part of the upcoming Mod API. 「 ディノ 奴 千？！ 」? · ☎ Dinoguy1000 05:04, 13 August 2012 (UTC)


 * It seems not to work with /pg clearPortals all, from the portalgun mod, but it may be that it will work with commands that don't need a player context.

Command Block Removed in 1.3.2
Somehow, the command block doesn't exist in 1.3.2. Someone tell me what happened and how can I get it back? Pikachu4170 17:04, 16 August 2012 (UTC)


 * Technically 12w32a was released after 1.3.2 which means all the new stuff is not included within 1.3.2. --☺ Sven ? ! 17:24, 16 August 2012 (UTC)

World Options Schematic (With Video)
Hey there, this is Tasaiala, I made a MCEdit schematic that lets you edit the gamerules commands using command blocks. This way it's prebuilt, and you don't have to set it up yourself. Just paste the .schematic into your world! Video:http://www.youtube.com/watch?v=r510tsosKlY Download: http://www.mediafire.com/?6ve861rv2fe3jhp

The bug is not a bug
The "bug" is not a bug - this will happen whne changing gamemode with cheats on as well. Therefore, it isn't a bug. 60.241.224.44 10:41, 16 September 2012 (UTC)

Dinnerbone documented it
https://gist.github.com/3736487 Looks like we missed a few points.  LB ( T 11:27, 17 September 2012 (UTC)

No more string limit?
I realized that in vanila weekly snapshot 12w38b, that string limit has been removed (or extended. Either way it got larger than 32) for Command Block. I'm not sure and want to see if someone can confirm one. If then, we should add about it on article. Kevin J Rattman 00:42, 23 September 2012 (UTC)

It is in the article. The limit is now 254 characters. See the command block wiki page. 68.69.166.115 00:39, 5 April 2013 (UTC)

commandBlockOutput and doFireTIck bugged?
everytime i try to use any of these 2 commands it only seems to be toggable to an off state. is anybody else having this problem too? and if so, is there any in-game solution to it?


 * So, both  and   do the same thing? If so please report this bug here. --☺ Sven ? ! 17:25, 6 October 2012 (UTC)

multi line?
does the command block support multi-line commands(i.e. multiple commands)? if so this should be added. Use multiple Command Blocks. 173.174.111.56 22:50, 30 November 2012 (UTC)

Singleplayer?
why can't you have the command block to make a singleplayer adventure map?

you can.do /give (yourname) 137 (cheats must be enabled)

enable-command-block server properties problem
evrytime i enable the command block in the server properties file (i use Bukkit) the server will start but then crash after a second. It doesnt crash when i disable command blocks, but i need to enable it. Any help?


 * Post the crash log on the Bukkit forums (not here); there is very little advice that can be given without it. -- Orthotope 03:03, 25 November 2012 (UTC)

Gamerule doMobSpawning
Does this gamerule disable all spawner blocks as well as random spawning of mobs in low light? (Is this "peaceful" mode?)

Also, slight clarification please. Does "False" = no spawning, while "True" = allow spawning, or the other way around? 86.25.209.30 05:41, 29 November 2012 (UTC)


 * If doMobSpawning is set to false, all random mob spawning is disabled. This affects animals, squid, and bats, as well as hostile mobs. Monster spawners, animal spawning when chunks generate, village iron golems, and any other method of creating mobs are not affected. -- Orthotope 08:25, 29 November 2012 (UTC)

bug singleplayer
evrytime i try to add any command on singleplayer it says: must be a opped player in creative mode.... –Preceding unsigned comment was added by 189.252.116.129 (Talk) 02:00, 31 December 2012 (UTC). Please sign your posts with


 * As stated on the page, you must be in Creative mode to edit a command block; this is intentional. -- Orthotope 03:33, 31 December 2012 (UTC)

/give command
At the start of the page it says: Only players with sufficient privileges to use the 'give' command. What "sufficient privileges"? Emerald267 16:07, 1 January 2013 (UTC)


 * That typically means Op status on a server. There are custom servers out there with setups that grant/deny specific privileges with different levels of abilities, but for straight vanilla servers, there's just normal users and ops.  16:19, 1 January 2013 (UTC)

NaN trick
A neat thing I found: If you assign a position a value, (eg x=), but don't say what position, it will teleport you anywhere. I have only tested this when I have a mod installed, but if someone would confirm, that would be nice. I used: tp @p[y=240,x=,z=,r=3] -1134 233 -979 Pokechu22 01:15, 3 February 2013 (UTC) EDIT: the above command actually always teleports, regardless of your position, but if you use tp @a[y=240,x=NaN,z=NaN,r=2] -1134 233 -979 it works. Pokechu22 01:26, 3 February 2013 (UTC)

Why?
Why does Mojang have the server default to disabling command blocks? It seems unnecessary, as it is a extra step for maps, and most people aren't worried about the command block. Pokechu22 01:53, 3 February 2013 (UTC)

Because anybody who doesn't change the .properties file after creating a server would otherwise have the possibility of another admin/mod/op figuring it out and griefing. If someone actually plans on using the block, it's only a small effort to change the line in the .properties file anyway. --Mrkddsmn 23:32, 30 March 2013 (UTC)

/kill command works
On the page they said "some commands have been disabled..." well one of them is the command /kill. without knewing this info i tried it out on my server and i managed to get this working. Is this a fault on the page or is this a bug in the command blocks? pls have a look at this! –Preceding unsigned comment was added by 78.20.48.184 (Talk) 01:38, 9 March 2013‎ (UTC). Please sign your posts with


 * Testing in single-player, /kill does not work. Servers often do not disclose which mods, if any, they are using, so unusual behavior should always be confirmed in single-player, or at least on a clean, completely unmodded server. -- Orthotope 07:09, 9 March 2013 (UTC)

/Kill works on most servers in vanilla, but only for killing yourself, a.k.a. suicide. 68.69.166.115 00:44, 5 April 2013 (UTC)

/kill @p hooked up to a rapid pulser worked for me in a single player LAN server... although we had to edit the map to remove it because of the pulser... not the brightest idea, but I wasn't expecting /kill to work.

Help me!
My brother has been kind enough to hack my worlds and put Command Blocks on all of them, ones I've had for a year and have irreplaceable builds on them, and set the command block on a repeating circuit and has me teleported far away. How can I fix this? Is there some other command that I can use on a new CB to stop the other one? He set it to /tp @a, so what can I do? 75.185.235.206 21:48, 15 March 2013 (UTC)

If you can host a tiny server on localhost, disable command blocks in server.properties, then find the block and destroy it! 109.156.20.183 17:44, 18 March 2013 (UTC)

Use WorldEdit and do a /replaceall on the command block data value within a large radius --Mrkddsmn 23:33, 30 March 2013 (UTC)

I have the same problem, but when i save my world in the server and copy and past the file to my saves it still doesnt work, it spawns me in the same place with the command block in tact... HELP! 82.8.158.236 19:33, 18 April 2013 (UTC)

How to exclude a player team ect from a command?
Im really wondering if there is a way to exclude a player team ect from a command. E.G. you want to exclude all admins from a game mode command by either a team or igns. 69.9.58.154 22:46, 18 March 2013 (UTC) 55555bookworm

@-codes should be moved to Server Commands
Players (and probably server console) can also use @a, @p and @r, so it would make more sense to move information about @-codes to Server Commands. (Tested in vanilla 1.5.1, creative singleplayer with cheats enabled) 93.73.186.104 18:56, 22 March 2013 (UTC)

Tripwire activation?
Hi, I was just wondering, apart from a redstone current, can a command block be activated with a tripwire hook? -- Numbermaniac  - T  - C 06:35, 5 April 2013 (UTC)


 * A tripwire outputs a redstone current. –ultradude25 ᐸ Talk Contribs 06:41, 5 April 2013 (UTC)

Pickable?
Regarding this paragraph: "Considering its great power and possibilities, it can't be normally crafted. Currently, it is not available in the creative mode inventory either. Only players with sufficient privileges to use the 'give' command: /give  137 can obtain the block. Furthermore, only players which are in Creative mode and are also an operator on the server are able to edit and successfully save the command of the block." Once placed, a command block is indeed "pickable" in Creative mode with middle-click. Should this be added, since a player who may not necessarily have access to the /give command can still get one if they are in Creative and one already exists in the world? AdmiralMemo 05:16, 29 April 2013 (UTC)

Doesn't recognize that I'm OP in Creative.
I used to be able to place and edit command blocks on my server, the old command blocks still work. I'm trying to place and edit new ones, but every time I put in the command it says "Must be an opped player in creative mode" which I am. I am the only OP on my server, and I am always in creative mode. Does anyone know what the problem might be? --Putchute 00:59, 2 May 2013 (UTC)

What does the @a code turn into?
For instance, @p turns into the name of the nearest player. What about @a? -User:Munomario777

it means @all players. 64.30.14.50 15:41, 14 May 2013 (UTC)

Random command?
Is it possible to set the command block up so it picks a random command every time it's activated? --Edendhri 20:55, 30 May 2013 (UTC)


 * No, at least as far as I know, but you can wire redstone to randomly pick from multiple command blocks. Rcmaehl 21:01, 30 May 2013 (UTC)

Help
Effects, i am trying to make effects affect everyone, but me who walks on them so i do /effect @p[!name= } 9 30 and even without the =, but its not working. Any help? –Preceding unsigned comment was added by 174.91.35.138 (talk)&#32;22:34, 2 June 2013‎(UTC). Please sign your posts with


 * @p only targets the closest player; try using . -- Orthotope talk 01:17, 3 June 2013 (UTC)