How to Use Command Blocks in Minecraft (with Pictures)

Table of contents:

How to Use Command Blocks in Minecraft (with Pictures)
How to Use Command Blocks in Minecraft (with Pictures)

Video: How to Use Command Blocks in Minecraft (with Pictures)

Video: How to Use Command Blocks in Minecraft (with Pictures)
Video: Create The Matrix Rain Effect (pymatrix-rain module) 2024, May
Anonim

With commands (also known as cheats), players can change any aspect of the Minecraft world, even other players in it. Each command block stores a specific command. Every time this block is active then the command in it will take effect. With command blocks you can build tons of fun toys, aids, or even elaborate adventure maps full of triggers.

Step

Part 1 of 3: Accessing Command Block

Use Command Blocks in Minecraft Step 1
Use Command Blocks in Minecraft Step 1

Step 1. Open Minecraft on PC or Mac

Only the computer edition of Minecraft has a command block. There are no command blocks in Minecraft Pocket Edition or Minecraft for game consoles.

Use Command Blocks in Minecraft Step 2
Use Command Blocks in Minecraft Step 2

Step 2. Enter the world where you have console access

Command blocks are in-game items that grant access to the Minecraft console to reshape the entire game, which is why command blocks are only available under certain circumstances:

  • On multiplayer servers, only the server operator can use the command block. You have to ask the operator to promote you, or you can create your own server.
  • In a world with single-player mode, you must activate the cheat method if it was not activated at the time of world creation. Open the menu and click Open to LAN, check the "Allow Cheats" box, then click Start LAN world. This command will only last one play session, but you can repeat it each time you want to add another command block.
Use Command Blocks in Minecraft Step 3
Use Command Blocks in Minecraft Step 3

Step 3. Switch to creative mode

Once you have console access, you can switch to creative mode. This is the only mode that allows you to place and program command blocks. To achieve this, use the following command:

  • Press T to open the console (chat bar), or press "/" to open it and automatically insert "/" into the line you type.
  • tik /gamemode c and press "Enter" to enter creative mode.
  • When you're done setting up the command block, type /gamemode s for survival mode or /gamemode a for adventure mode.
Use Command Blocks in Minecraft Step 4
Use Command Blocks in Minecraft Step 4

Step 4. Create a command block

Open the console again with T then type this command: /give (username) minecraft: command_block 64. Replace (username) with your full Minecraft name, without the brackets.

  • Usernames are case sensitive.
  • If nothing happens, you may have to update minecraft to at least version 1.4. Update to the latest version to access all commands.
  • You can replace "64" with any number to receive as many blocks as that number. The number 64 will create a full stack of command blocks.

Part 2 of 3: Using Command Block

Use Command Blocks in Minecraft Step 5
Use Command Blocks in Minecraft Step 5

Step 1. Place the command block

Go through the inventory and look for the command block that was just created. The icon is a brown square and patterned with a gray control panel on each side. Move the command block to the quick slot and place one command block on the ground, as you normally would with any other item.

Use Command Blocks in Minecraft Step 6
Use Command Blocks in Minecraft Step 6

Step 2. Open the command block interface

Approach the command block and right-click to open it, like opening a chest. A window containing a text box will open.

If nothing happens, the command block may be disabled on the server. People who can access the server.properties file must open this file and set enable-command-block to "true" and op-permission-level to "2" or higher.

Use Command Blocks in Minecraft Step 7
Use Command Blocks in Minecraft Step 7

Step 3. Enter the command

You can enter any command into the command block text field, then press Done to save it in that block. A number of workable commands are available at the bottom, but as your first one try them summon Sheep.

  • To learn more about commands, open a regular console (not a command block) and type /help.
  • Unlike the regular console, the command block text box does not need to start with the "/" symbol.
Use Command Blocks in Minecraft Step 8
Use Command Blocks in Minecraft Step 8

Step 4. Activate the block with redstone

Connect the redstone dust trail to the command block, then place a pressure plate over the redstone. Walk over the plate to activate the redstone, and a sheep will appear next to the block. This will happen every time a player or mob activates redstone.

  • It works the same way as regular redstone activation. You can replace the pressure plate with a button, lever, or other means of activation. You can even place the button directly in the command block.
  • Anyone can use the command block once it's set up, but only players with the right permissions can change the command.
Use Command Blocks in Minecraft Step 9
Use Command Blocks in Minecraft Step 9

Step 5. Learn custom syntax

Most of the command block text works like a regular console. If you're not familiar with the console, check out the samples section below to get started. If you already know how to use console commands, here are the additional parameters you should master:

  • @p targets the closest player to the command block, regardless of how far away that player is.
  • @r target random players anywhere on the server.
  • @a target every single player on the server, including yourself.
  • @e target every "entity" on the server. This includes anything that isn't a block, including players, objects, enemies, and animals. Be careful changing this one.
  • You can use this parameter anywhere you would use a player name or entity name (though these parameters still work fine).
Use Command Blocks in Minecraft Step 10
Use Command Blocks in Minecraft Step 10

Step 6. Change the syntax for another control (optional)

You can make the command extra specific by adding a modifier after @p, @r, @a, or @e. This syntax uses [(arguments)=(value)]. There are many arguments and values available. You can see the full list online, but here we have some examples for you:

  • Commands that include @r[type=Sheep] will affect a sheep at random.
  • @e[m=c] affect everyone in creative mode. The "m" argument stands for mode, and the "c" stands for creative.
  • Use the "!" symbol to create the opposite value. For example, @a[team=!Commando] will affect every player not on the "Commando" team. (Teams only apply on player-created maps.)
Use Command Blocks in Minecraft Step 11
Use Command Blocks in Minecraft Step 11

Step 7. Use the "Tab" button to view the help

If you know a command but have no use for it, press "Tab" and the game will fill it in. Press "Tab" a second time to scroll through the list of options.

For example, go back to the calling block and delete the word "Sheep". Press "Tab" to toggle through the list of possible entities

Part 3 of 3: Command Block Sample

Use Command Blocks in Minecraft Step 12
Use Command Blocks in Minecraft Step 12

Step 1. Create a teleportation box

Save command tp @p x y z to the command block. Instead of x, y, and z, enter the x, y, and z coordinates of the teleportation destination (for example, /tp @p 0 64 0). When someone activates this box, the closest player to the box will disappear and appear at the predetermined coordinates.

  • Press "F3" to display the coordinates.
  • Just like any other command, you can replace "p" with another parameter. If you type in your username, you will be teleported, even if someone else activates this block. If you use @r, random players on the server will be teleported.
Use Command Blocks in Minecraft Step 13
Use Command Blocks in Minecraft Step 13

Step 2. Unfold the object or block

Assuming you're using Minecraft version 1.7 and above, you can create a command block to call any entity or block. Here are some examples for that:

  • Command block with summon boat will add a new ship beside the block, every time this block is active. Everyone from your server doesn't have to wait for the ferry anymore.
  • To show blocks instead of entities, use the command setblock instead of a command to call. Order minecraft set block:water 50 70 100 will turn the block at coordinates 50-70-100 into water. If there is already a block there, it will disappear.
Use Command Blocks in Minecraft Step 14
Use Command Blocks in Minecraft Step 14

Step 3. Destroy objects or players

The "kill" command will permanently destroy an entity. This command is dangerous if used. If you type wrong, you will destroy the wrong object (or even the whole world if you use @e). kill @r[type=Painting, r=50] will destroy random paintings within a 50 block radius of the command block.

Use Command Blocks in Minecraft Step 15
Use Command Blocks in Minecraft Step 15

Step 4. Control time and weather

Order time set day or time set 0 will set the sunlight level to the specified amount. Change the value to 0 to set any time you like. After getting tired of the eternal sunshine, make a block with the command toggledownfall or weather rain to make it rain.

Use Command Blocks in Minecraft Step 16
Use Command Blocks in Minecraft Step 16

Step 5. Try other commands

There are hundreds of commands you can find using /help or by looking it up on Minecraft sites. Explore the following commands:

  • say (message)
  • give (player) (item) (number of items)
  • effect (player) (potion effect)
  • gamerule
  • testforblock

Tips

  • On a regular console, type /help to display a list of commands. tik /help (command name) to display a specific command. You can also find more information about commands on the Minecraft wiki and community site.
  • To turn off chat notifications from a successful command, open a regular console and enter /gamerule commandBlockOutput false.
  • Nothing happens if the signal to the command block is disabled. The command block will re-trigger once the signal returns.
  • Even if a command block is not directly connected to redstone, it will trigger if a solid adjacent block has a redstone "signal strength" of 2 or more.

Warning

  • A redstone signal must be amplified by a redstone repeater if it travels more than 15 blocks.
  • You must click Done to save the command block. Closing the window by pressing the "Esc" key will not save the command.

Recommended: