Minecraft Blogs / Tutorial

[Discontinued] [ C|T #1 ] The basics

  • 679 views, 1 today
  • 10
  • 3
  • 4
Bertiecrafter's Avatar Bertiecrafter
Retired Moderator
Level 70 : Legendary Engineer
772

This series is discontinued. Have a look at my new series about data packs (1.13+).


In the C|T (Command Tutorial) series
I will be giving tutorials on commands.

The basics:
If you are new to commands at all, this is a good place to start.
Minecraft can get boring after a while and sometimes you just want to
feel like a god in your own world and do fancy things.

Most of your imaginations can be done with commands,
although they can get very difficult.

Although the easy commands don't allow you to do as much,
you have to start somewhere.

All commands are listed at:
http://minecraft.gamepedia.com/Commands#List_of_commands

The syntax:
This is basically the format that you use for commands.
You can find the syntax of commands on the wiki page or use /help <command>.
Those pointy brackets are part of the syntax too:
- < > means required
- [ ] means optional. If there are multiple, make sure to enter the values for the ones in front as well.

For example: If there was a command "/broadcast <message> [​to player] [​from player]" the possibilities are:
/broadcast HEY
/broadcast HEY ThatDude
/broadcast HEY ThatDude Me
If you would execute /broadcast HEY Me, it will result in you getting the message, because it's used for the slot [​to player].

- if you find | in the brackets, it means OR.
For example: /gamemode <creative|survival|adventure|spectator|c|s|a|sp|0|1|2|3> [​player]
Of course, this is simplified as: /gamemode <mode> [​player]

Arguments:
Every single thing that gives further detail to the command is called an argument. <mode> in the /gamemode command is an argument. Sometimes you can auto-complete an argument by pressing [​TAB]. E.g /gamemode cr[​TAB] will auto-complete to /gamemode creative.

<player>:
If you find a player argument, you can of course use the player name, but using target selectors is way more useful.
The target selectors are @a (all), @p (nearest), @r (random), @e(all entities) and @s (the executor). An entity is anything that moves, like a cow.
For example: /kill @a will kill everybody.

You can use selector arguments to select specific players out of all players that already match the target selector.
/kill @a[​m=1] - This kills all players with gamemode 1
/kill @e[​type=!Player] - This kills all entities (moving things), that are not players.
/clear @a[​rm=1] - Clears everybody's inventory, with a minimum radius of 1. This usually means everybody, but you.
/clear @p[​c=3] - Clears the inventory of the three nearest players.

You can find all selector arguments and their explanations at
http://minecraft.gamepedia.com/Commands#Target_selectors

Positions - <x> <y> <z> and <x2> <y2> <z2>:
Sometimes you will have to put in coordinates, for example in the /tp command.
Of course you can use numbers (press F3 to find the coords), but you can also use a position relative to the executer.
You use a tilde ( ~ ) for your current location on an axis, just put a number behind for an offset.
For example: /tp ~ ~1 ~ This teleports you one block up.

Blocks and data values:
In the commands /give, /fill, /clone, /clear and some others, you can define blocks.
Use F3+H to toggle advanced info in your inventory. When you now hover your mouse on a block in your inventory, you will be able to find the name. Stone is called "minecraft:stone". Remember that you can also use [​TAB] to easy autocomplete things.

A Data Value is a number to define the type of block. In the code this is also called the damage. Make sure not to confuse this argument with the DataTag argument. They are way more advanced and allow further customization. We will talk about them in another tutorial.

When people talk about a Data Value, there is always some confusion. A command syntax (on the wiki or from /help) will use the words "Data Value", but internally it's called "Damage". This is because tools with damage existed before similar blocks with the same id. So a sword with damage 50 is simply for 50 points damaged, but wool with damage 1 means it's orange.
Computers count from 0 and so does minecraft. Wool with damage 0 is white.

In most commands you use the number for the Data Value, but when you are going to define DataTags, you use the number in combination with the word "Damage" in your code. To people who don't understand commands, you would usually say "Data Value". If you want to literally "quote" a command out of your creations, use the word "damage" whenever it applies to your commands.

You can find the Data Value of a block in the tooltip of your inventory. It's behind the slash.
The number in front of the slash was used instead of the name in previous versions, you won't use it anymore.
(You used /give <player> 1 before, instead of /give <player> minecraft:stone. I am glad they changed it :P )

You can also find the numbers on the wikipages of every single block.

That's it for this tutorial.

I hope you enjoyed it and don't forget to leave a diamond if you want more tutorials :)

[Discontinued] [ C|T #1 ] The basics
[Discontinued] [ C|T #1 ] The basics
My Server: GIBI
[Discontinued] [ C|T #1 ] The basics
Click the banner for more info!
Tags

1 Update Logs

Update #1 : by Bertiecrafter 06/03/2017 3:56:53 pmJun 3rd, 2017

Updated information to 1.12.
Rebranded due to function files being added soon.
Tried to clear up confusion about Data Value and Damage better.

Create an account or sign in to comment.

1
08/09/2020 4:52 am
Level 1 : New Miner
Karenthomas
Karenthomas's Avatar
There are Minecraft circle tool, Minecraft circle formula, Minecraft circle planner,
and more to make a circle in Minecraft.Minecraft circle generator
1
12/07/2016 9:31 pm
Level 23 : Expert Engineer
Heklo
Heklo's Avatar
Nice tutorial!
1
12/08/2016 6:19 am
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
Thanks!
1
12/06/2016 5:59 pmhistory
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
Thank you camo_scout, shadow_ninja290, Heklo, catmelonhat, Draver10, +Neotude+, pettyGamingHD and PixieMax for the diamonds!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome