Where to start learning command blocks?

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

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.

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).

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:

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.

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 ~ ~ ~ stone1.12.2: /execute @e[type=creeper] ~ ~ ~ setblock ~ ~ ~ stoneWhat 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

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.

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.

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.

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)