Welcome to the complete guide for command blocks made by myself, intipablo. I remember a while back when i was first getting into map making and i was desperate to learn these things called command blocks, people had told me they could do virtually anything in minecraft, but they were soo confusing. And all the tutorials did was give me examples of what they could do. Although there are a couple good tutorials out there, i wanted to show you the complete guide of how these things work and how they can help you soo much with your maps!
~ What you need to know before we start! ~
- Targeting Players & Entities:
@p = Nearest Player
@a = All Players
@r = Random Player
@e = All Entities
- How to get yourself a command block:
Type: /give @p command_block
You can also use different Targets instead of the @p. Aswell as replace it with your username.
- You should know most of the elements of Minecraft and be quite familiar with the game.
Lets Begin!
~ Contents ~
~Basics and for begginers: ~
Brief talk on DataTags {}
Brief talk on Relative Coordinates
Gamerules
Messages and Broadcasting
Weather
Teleporting
Spawnpoint
Difficulty
XP
time
Gamemode
~ Amateur Commands: ~
Talk on Names,Radius and Entities
Give command
Clear
Exceute
Testfor & Testforblocks
Playsound
Effect & Enchant
setblock
fill
This is a brief talk on Datatags. These are things you will see in most commands.
Datatags are NBT tags used to specify different Attributes and such to Entities & Blocks! They can have multiple NBT tags which allows you to have many different things. And all without any 3rd party programs!
The Datatag is essential to most advanced commands and they are a very important part of this guide and commands as a whole.
Datatags are always encased in curly Brackets: {} and you can easily use tags together by using a comma.
You may also notice that some of the commands in this guide also use Square Brackets: [] These are known as 'arrays'. Basically a set of Tags combined into one. And each item in one of these 'arrays' is also separated by a comma so you would easily add a comma to the main tag if you wanted to add more entries.
Ok, so now that Datatags are done lets move on to Relative Coordinates. I'm sure you all know what coordinates are. And to simply put it: The name says it all. Relative coordinates are Coordinates relative to the entity you are specifying. So lets say I want to teleport my self 5 blocks in 'Z' direction. I would type:
/tp @p ~ ~ ~5
Relative coordinates are started with a tilda: ~ and the 5 there means I will get teleported 5 blocks in 'z' direction from where i'm standing. So its teleporting relative from me.
-------------------------------------------------------------------------------------------
Gamerules
Ok now that those boring talks are done its time to get on with some commands!!
Gamerules are extremely important to your map.
The way Gamerules command Syntax works is very simple. We simply do this:
/gamerule
Now the true or false part may confuse you. True means the gamerule will be turned on in the world. And false obviously means the opposite. Here is a list of all the gamerules:
you can also see all the gamerules ingame! By typing: /gamerule and then pressing enter.
- commandBlockOutput: Whether command blocks should notify admins or opped players when they use commands
- doFireTick: Whether fire should spread.
- doMobLoot: Whether mobs should drop loot.
- doMobSpawning: Whether mobs should naturally spawn.
- doEntityDrops: Whether any entity should drop loot.
- doTileDrops: Whether blocks should have drops.
- keepInventory: Whether the player should keep items in their inventory if they die.
- mobGriefing: Whether explosive mobs and Enderman should be able to change and destroy blocks.
- doDaylightCycle: Toggles the day-night cycle.
- naturalRegeneration: Toggles natural health regeneration.
- showDeathMessages: Whether the message comes up when a player dies.
--------------------------------------------------------------------------------------------------------------------
Messages and broadcasting
So now onto Messages.
There are 2 commands for this: /say and /tell
Say command:
The say command is fairly simple so lets take a look at an example:
/say hello world
Will print a message in your chat window saying : [your name here] hello world
so whoever enters the command will have their name before the actual words. This message will also be broadcasted over the whole server/world.
Tell command:
The tell command is also simple so here's an example:
/tell H3x Hello
Will tell a player called H3x hello.
But you can also target all players with @a which is basically the same thing as the say command.
The player(s) receiving your message will get something in their chat saying you've whispered the message to them!
Now, i'm sure all of you wished you were able to control the weather. But now you actually can!
Lets start with rain. The simplest way to turn rain on and off is of course using the /toggledownfall command.
Note: Toggledownfall will turn SNOW on/off in biomes where snow is generated.
But there's another way as well! Using the new Weather command. Here's how its used:
/weather rain <time>
<time> will be the amount of time you want the rain to last. This 'time' will be measured in seconds.
Ok so now that rains done. Lets move onto the weather command as a whole. Obviously we have the first command (above) showing us how the rain works. But we can also make thunder! And we can clear the weather!
/weather thunder <time>
Is obviously for the thunder, same as the rain command.
/weather clear <time>
Its self explanatory now.
So that's basically it for the weather! Hope you enjoyed!
COMPLETE COMMAND GUIDE
by intipablo
~ Introduction: ~
Welcome to the complete guide for command blocks made by myself, intipablo. I remember a while back when i was first getting into map making and i was desperate to learn these things called command blocks, people had told me they could do virtually anything in minecraft, but they were soo confusing. And all the tutorials did was give me examples of what they could do. Although there are a couple good tutorials out there, i wanted to show you the complete guide of how these things work and how they can help you soo much with your maps!
~ What you need to know before we start! ~
- Targeting Players & Entities:
@p = Nearest Player
@a = All Players
@r = Random Player
@e = All Entities
- How to get yourself a command block:
Type: /give @p command_block
You can also use different Targets instead of the @p. Aswell as replace it with your username.
- You should know most of the elements of Minecraft and be quite familiar with the game.
Lets Begin!
~ Contents ~
~Basics and for begginers: ~
Brief talk on DataTags {}
Brief talk on Relative Coordinates
Gamerules
Messages and Broadcasting
Weather
Teleporting
Spawnpoint
Difficulty
XP
time
Gamemode
~ Amateur Commands: ~
Talk on Names,Radius and Entities
Give command
Clear
Exceute
Testfor & Testforblocks
Playsound
Effect & Enchant
setblock
fill
~ Expert/Advanced ~
Scoreboard
~ Map Tricks And Machines ~
Custom Commands
-----------------------------------------------------------------------------------------------------------------------------------
Brief Talk On DataTags
This is a brief talk on Datatags. These are things you will see in most commands.
Datatags are NBT tags used to specify different Attributes and such to Entities & Blocks! They can have multiple NBT tags which allows you to have many different things. And all without any 3rd party programs!
The Datatag is essential to most advanced commands and they are a very important part of this guide and commands as a whole.
Datatags are always encased in curly Brackets: {} and you can easily use tags together by using a comma.
You may also notice that some of the commands in this guide also use Square Brackets: [] These are known as 'arrays'. Basically a set of Tags combined into one. And each item in one of these 'arrays' is also separated by a comma so you would easily add a comma to the main tag if you wanted to add more entries.
--------------------------------------------------------------------------------------------
Brief Talk On Relative Coordinates
Ok, so now that Datatags are done lets move on to Relative Coordinates. I'm sure you all know what coordinates are. And to simply put it: The name says it all. Relative coordinates are Coordinates relative to the entity you are specifying. So lets say I want to teleport my self 5 blocks in 'Z' direction. I would type:
/tp @p ~ ~ ~5
Relative coordinates are started with a tilda: ~ and the 5 there means I will get teleported 5 blocks in 'z' direction from where i'm standing. So its teleporting relative from me.
-------------------------------------------------------------------------------------------
Gamerules
Ok now that those boring talks are done its time to get on with some commands!!
Gamerules are extremely important to your map.
The way Gamerules command Syntax works is very simple. We simply do this:
/gamerule
Now the true or false part may confuse you. True means the gamerule will be turned on in the world. And false obviously means the opposite. Here is a list of all the gamerules:
you can also see all the gamerules ingame! By typing: /gamerule and then pressing enter.
- commandBlockOutput: Whether command blocks should notify admins or opped players when they use commands
- doFireTick: Whether fire should spread.
- doMobLoot: Whether mobs should drop loot.
- doMobSpawning: Whether mobs should naturally spawn.
- doEntityDrops: Whether any entity should drop loot.
- doTileDrops: Whether blocks should have drops.
- keepInventory: Whether the player should keep items in their inventory if they die.
- mobGriefing: Whether explosive mobs and Enderman should be able to change and destroy blocks.
- doDaylightCycle: Toggles the day-night cycle.
- naturalRegeneration: Toggles natural health regeneration.
- showDeathMessages: Whether the message comes up when a player dies.
--------------------------------------------------------------------------------------------------------------------
Messages and broadcasting
So now onto Messages.
There are 2 commands for this: /say and /tell
Say command:
The say command is fairly simple so lets take a look at an example:
/say hello world
Will print a message in your chat window saying : [your name here] hello world
so whoever enters the command will have their name before the actual words. This message will also be broadcasted over the whole server/world.
Tell command:
The tell command is also simple so here's an example:
/tell H3x Hello
Will tell a player called H3x hello.
But you can also target all players with @a which is basically the same thing as the say command.
The player(s) receiving your message will get something in their chat saying you've whispered the message to them!
---------------------------------------------------------------------------------------------
Weather
Now, i'm sure all of you wished you were able to control the weather. But now you actually can!
Lets start with rain. The simplest way to turn rain on and off is of course using the /toggledownfall command.
Note: Toggledownfall will turn SNOW on/off in biomes where snow is generated.
But there's another way as well! Using the new Weather command. Here's how its used:
/weather rain <time>
<time> will be the amount of time you want the rain to last. This 'time' will be measured in seconds.
Ok so now that rains done. Lets move onto the weather command as a whole. Obviously we have the first command (above) showing us how the rain works. But we can also make thunder! And we can clear the weather!
/weather thunder <time>
Is obviously for the thunder, same as the rain command.
/weather clear <time>
Its self explanatory now.
So that's basically it for the weather! Hope you enjoyed!
Thats it for now! Updates will come very fast!!
Update: Added Weather