Ask how can I improve my command skills in Minecraft Java Edition? Up until now I have mainly gotten my knowledge from YouTuber TheJoCraft. But I don't understand the concept behind the commands. Especially with these different brackets and the execute command.
Only try and error can help. And read a lot.
The whole thing is more complicated, much of it has a lot to do with programming MC. You can even access external files via command blocks if you want. Most of these "long" lines consist of simple color codes and font formatting. Sometimes compare and grind.
http://minecraft-de.gamepedia.com/...com/Befehl
You can read a lot about commands there.
I can recommend that you stay tuned to the commands, practice makes perfect.
TheJoCraft explains such things very well. Which is why it can't hurt to keep looking at him.
If you need the syntax of a command, you can look it up in https://minecraft-de.gamepedia.com/...craft_Wiki.
It may also be helpful to know that Minecraft commands are hierarchical. I don't know exactly when square brackets [] and when curly brackets {} are used. Just keep in mind that they always alternate and open brackets always have to be closed.
/ give @a [distance = .10] diamond_sword {Enchantments: [{id: looting, lvl: 3}, {id: mending, lvl: 1}]} 1
If I had to make this command hierarchical, it would look something like this:
/ give @a [distance = .10]
diamond_sword {
Enchantments: [
{id: looting, lvl: 3},
{id: mending, lvl: 1} / * no comma here, since no further enchantments are coming * /
] / * With a comma here, you could add more besides the enchantments / *
} 1
/ * Comment * /
I would recommend writing commands like this first, then all you have to do is remove the paragraphs and comments and you can use them in Minecraft.
I think you are confusing something here. Commands are not a programming language. You can neither access external files with it, nor are if statements and loops possible. As the name suggests, a command is nothing more than a command. A command block can actually only save and execute a single command. You can create functions and loops with data packs. And if statements by execute commands and scoreboards.
By files I mean e.g. The inclusion of external sounds😉 You said well that ifa are possible, I never said that it is possible directly. By programming MC I mean Java. If you take a look at the arguments of the commands, you will see, especially with regard to the brackets, that it has a lot to do with the Java syntax.
The language of the commands is, to be precise, Json, which is not a programming language like Java, but a design language à la XML.
External sound can only be integrated through resource packages, not through commands.