2

Where to start learning command blocks?

2 emeralds 15 replies 152 views | started 05/26/2018 6:50 am by Liam44JT
I would like to learn to create things with command blocks, but I have no clue where to start learning. I looked on Youtube, but most of the videos are quite old. Does anyone know a good place to learn command block programming? If so, please tell me :)



All help is welcome!
Posted by avatar
Liam44JT
Level 2 : Apprentice Explorer
2

15 replies

1
06/07/2018 3:38 pm
Level 22 Expert Engineer
ShelLuser
avatar
The only way to learn this stuff is by actually doing something. I actually don't necessarily agree with the previous posters (to a certain degree) that you should start with 1.13. See: it's not so much the commands which you need to learn, what's most important is that you'll get a grip on how this whole thing actually works.

And some mechanics don't really change all that much between versions.

For example... Command blocks. How to execute a command when something else has worked (or not)? That's when you'll discover the conditional command blocks. How to chain commands? It's already in the name: use chain command blocks.

That mechanic doesn't change between Minecraft versions yet lies at the very basis of understanding all this stuff.

My suggestion is seriously: go out and DO stuff. That's the best way to learn.

For example... I'm currently playing a snapshot session with a good friend of mine. I'm in creative, they're in survival and we set up a rule that she can make one "wish" per in-game day, and if it's a good one it gets granted.

That's honestly an awesome way to get into this stuff. Because serious players can come up with much more stuff than you can make work :P

This is a fun example... she has a treasure chest which contains some important stuff. So to make sure that "people aren't messing with my chest" (there's only two of us, lol!) she wanted an alarm system :D So I made one! I put a trapped chest on top of a command block and then used this:

execute unless entity @p[name=AyanamiKun,distance=..15] as @p[name=AyanamiKun] run title @s title {"text":"Treasure opened!", "color":"red","italic":"true"}

So.. unless my friend is within a 15 block radius from the chest then she'll get a warning message that someone has opened the treasure box.
1
05/30/2018 1:47 pm
Level 4 Apprentice Explorer
GamingGav
avatar
I Can Help You!

MCxtraFG.aternos.me
This is just my original server, ill need your name, And Then i can Help You, Sorry If Im Advertising On Your Project, Not Tryin To!

Im Good At Command BLocks Commands Like:
Title
Tellraw
Fill
Weather
Clear
Testfor

And A TON More, I Know Every Command!

If Youre In, Thank You! <3
3
05/30/2018 4:44 am
Level 54 Grandmaster Cyborg
Pepijn
avatar
Just a tip, start learning with 1.13 commands. They changed a decent amount (a lot more is possible with them!). 1.13 will probably be out sooner than later and I'm sure a lot of youtubers will create videos about how to use the new 1.13 stuff (I always quite like Slicedlime's videos, he also covers every snapshot).
1
05/30/2018 1:03 pm
Level 2 Apprentice Explorer
Liam44JT
avatar
Ok, thanks! :)
1
05/29/2018 3:11 am
Level 2 Apprentice Explorer
Liam44JT
avatar
Thanks for all the help HappyHippo! :)
2
05/28/2018 2:27 pm
Level 5 Apprentice Miner
HappyHippo77
avatar
Hey! Welcome to commands! A world of wonder, annoyance, and hours of debugging awaits you! (Don't worry, it's not really that bad XD) If your trying to learn command blocks, check out some of these links:

Basic command walkthroughs and descriptions:
https://www.digminecraft.com/game_commands/

TheRedEngineer (A great youtuber with videos perfect for learning the use of some specific intermediate commands):
https://www.youtube.com/user/TheRedEng

Dragnoz (A youtuber with slightly more basic principles, more on the command itself rather than it's application):
https://www.youtube.com/user/dragnoz/featured

I don't know much about 1.13, so you should probably find something for that too, as I am going to need to re-learn everything myself.

Sorry if this isn't a big help, i'd like to tell you everything i know, but that would probably be an entire website worth of text.
2
05/27/2018 7:18 pm
Level 7 Apprentice Engineer
Cadermate
avatar
Welcome to the wonderful (And sometimes annoying) world of commands.

Also, if you do use a generator, make sure to use McStacker 2 for 1.13.
2
05/27/2018 3:47 am
Level 2 Apprentice Explorer
Liam44JT
avatar
I'm really glad you told me to learn 1.13 commands, because this whole time I was learning 1.12 commands, and it would be a real bummer to have to re-learn everything. I'll check out the command page.
3
05/26/2018 8:22 pm
Level 1 New Crafter
SUPERIONtheKnight
avatar
WARNING!!! LONG READ AHEAD!!! Scroll down if you need a TLDR!

I personally think that a good place to start is on the Minecraft Wiki. Here's the Command Page for you to look at. Now this will probably be overwhelming to look at for the first time as there is a lot to learn, so I recommend starting small and working your way up.

I would also try to avoid learning commands for 1.12.2(Unless you really want to). If you start in 1.12.2, you will have to relearn everything about them should you ever want to update to 1.13. The reason is that 1.13 has made some massive changes to commands in general. We even have new features like raycasting, command coloring, and even the ability to add a prefix/suffix to a players username in chat.

Now because 1.13 is still in snapshots, it's possible that some of the 1.13 commands I provide don't work in the final version. So do keep that in mind.

Here's some things that are good to know when starting out.


Do you need to detect if a creeper is 3 blocks south of the player? Or maybe you need to detect what block the player is looking at? Understanding Tilde and Caret notation allows you to achieve all of that.
/setblock ~ ~ ~3 stone

This is what's used to select an entity. For example, lets say you want to set a block of stone inside of every creepers feet. Using Target Selectors, Here's a rather basic command that will do exactly that.
1.13: /execute at @e[type=creeper] run setblock ~ ~ ~ stone
1.12.2: /execute @e[type=creeper] ~ ~ ~ setblock ~ ~ ~ stone
What this command means is that we are running a command at the target selectors location. In this case, @e[type=creeper] is the target selector. As a result, the setblock command is relative to any creepers feet.

A Blockstate is what defines the features to a block, they are meant to replace Data Values. As an example, it allows us to place an upside down stair.
1.13: /setblock ~ ~ ~ oak_stairs[half=top]
1.12.2: /setblock ~ ~ ~ oak_stairs half=top
Recommended Commands

Once you have learned how to use Tilde and Caret notation, Target Selectors, and Block States/Data Values, I recommend that you start learning some of the following commands. I left some notes right next to each link to help you understand the differences between versions.
  • /help : /? is no longer an alias in 1.13.

  • /gamemode : Can't use numbers or abbreviations in 1.13.

  • /difficulty : Can't use numbers or abbreviations in 1.13.

  • /say : This command hasn't changed between versions.

  • /setblock : 1.13 doesn't have the [datavalue/state] or the [datatag] arguments.

  • /fill : 1.13 doesn't have the [datavalue/state] or the [datatag] arguments.

  • /summon : This command hasn't changed between versions.

  • /tp or /teleport : There isn't a difference between the two commands in 1.13 whereas there is in 1.12.2.

  • /gamerule : Can't use custom gamerules in 1.13.

  • /give : 1.13 doesn't have [data] and [datatag].

  • /weather : The only change between versions is how long the weather will last if the duration isn't set.

  • /time : Additional options in 1.13.

  • /execute : This command has major differences between versions. 1.12.2 syntax here. For 1.13 syntax, click here and scroll down until you see /execute.

  • /scoreboard : In 1.13, "/scoreboard teams" and "/scoreboard players tag" were split into two new commands. Also, the names to statistics are being updated.

  • /team : Adds a team that players can join/leave/etc. Can be used to set a team color, whether players can collide, etc.

  • /tag : Can be used to target specific entities. It's basically like giving entities a secondary name that can be used to target them with Target Selectors.



At this point, I recommend looking into Datatags. They allow you to do some cool stuff with blocks/items/entities. As an example, The following command will summon a floating armor stand.
/summon armor_stand ~ ~ ~ {"NoGravity":1b}
And because I thought you might need another example, the following will place a command block with the command "/say hi" inside of it.
1.13: /setblock ~ ~ ~ command_block{"Command":"/say hi"}
1.12.2: /setblock ~ ~ ~ command_block 0 replace {"Command":"/say hi"}

The Command Block can be used to run a command without the need of the player manually typing it in chat. It has three modes: Impulse, Chain, Repeat. If you use this block, be sure to put them inside the worlds Spawn Chunks.
  • Impulse: Activates once.

  • Chain: Can be used to chain multiple command blocks together, this is done by pointing the arrow of the command block into the next chain command block. Commands are run from the start of the chain, to the end of the chain in order.

  • Repeat: Activates 20 times a second.


We can also use the "Needs Redstone"/"Always Active Setting". "Needs Redstone" means that the command block will run whenever powered by redstone. "Always Active" means that the command will run right away.

There is also the option of "Conditional"/"Unconditional". "Conditional" means that the command will only run if the command block behind it was successful in running its command. "Unconditional" means that the command will run regardless.


Datapacks are a little more advanced, but I thought I would include them anyways. A Datapack is like a vanilla mod for 1.13+. It can be used inside of any worldsave to add your own advancements/function/recipes/etc. IMO, They are the next step to take after learning command blocks.

Conclusion

Now obviously there is a lot more to learn about commands, but I can't list it all here as that would make this post way too long(It's already long enough :P). My goal was simply to give you an idea as to what you are looking for. One last thing I'd like to say though is that you can use this page to see what is changing in 1.13. Also, here is another link to the Command page I mentioned earlier.

TLDR; I recommended learning Tilde and Caret notation, Target Selectors, and Block States/Data Values. After that, I recommended learning 16 different commands and Datatags. Next, I finally got to talking about Command Blocks and Datapacks.

I hope this was helpful! :D
~SUPERIONtheKnight
3
05/28/2018 2:34 pm
Level 5 Apprentice Miner
HappyHippo77
avatar
Wow you've even helped me a bit and I've been in commands since 1.8.8!
2
05/26/2018 10:53 am
Level 22 Expert Engineer
Barlennan
avatar
There certainly aren't enough command block programmers, its always nice to see people who want to become one.

I can help you somewhat. Do you know how to do anything with command blocks, or are you completely starting to learn commands? What things do you want to do with command blocks?
And also, using generators such as mcstacker.net is fine and all, but there are some things you have to type yourself. Such as the {Inventory:[{id:"diamond_sword"}]} tag, which is apparently not included in mcstacker. I use mcstacker mostly for custom villagers, because those commands are quite long and bothersome.
2
05/26/2018 10:08 am
Level 19 Journeyman Button Pusher
TheKingOfArkel
avatar
I started learning command blocks by using generators to create commands that I needed, and I tried to understand how the command worked that the generator gave.

I'd suggest mcstacker.bimbimma.com as a good generator.
2
05/26/2018 8:01 am
Level 1 New Explorer
SilvaSky54
avatar
1
05/26/2018 1:31 pm
Level 2 Apprentice Explorer
Liam44JT
avatar
Wow! I didn't expect so many replies so soon! I do know A few things, teleportation, make text appear in the chat, I just learned to give someone a potion effect, and I am messing around with particles.
I know a few things. I want to create fun minigames and adventure maps with command blocks.
2
05/28/2018 2:33 pm
Level 5 Apprentice Miner
HappyHippo77
avatar
I suggest trying out a generator for /tellraw, as that command is much better for text than /say, it even supports colors! I also suggest the same for /title, which is good for map introductions and other more defined text.

(I'm trying so hard to be helpful, I'm almost sad at how hard it is and how much I'm failing DX)

Search

Browse

Site

© 2010 - 2018
planetminecraft.com

Welcome