Help learning command blocks
Newb here. Playing bedrock on Android. Just learned about command blocks but I can't get them to do what I want.
I want to end up with an enchanted item, like a netherite sword. So knowing that you can't give an enchanted item, I thought I'd create command blocks to do the following, one command per command block:
-give the nearest player a netherite sword
-enchant sharpness 2
-enchant unbreaking 3
Etc
So I switch to creative, place the command block and type the following into the command input: give @p netherite_sword 1
When I trigger it in creative, it just opens the command block dialog, when I trigger it in survival, it does nothing.
What am I doing wrong?
I want to end up with an enchanted item, like a netherite sword. So knowing that you can't give an enchanted item, I thought I'd create command blocks to do the following, one command per command block:
-give the nearest player a netherite sword
-enchant sharpness 2
-enchant unbreaking 3
Etc
So I switch to creative, place the command block and type the following into the command input: give @p netherite_sword 1
When I trigger it in creative, it just opens the command block dialog, when I trigger it in survival, it does nothing.
What am I doing wrong?
Commentaires
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
Thanks for the information, much appreciated!
Also heads up, you can totally give enchanted items in one command. Try something like:
\`/give u/p netherite\_sword{Enchantments:\[{id:sharpness,lvl:2},{id:unbreaking,lvl:3}\]}\`
Way easier than multiple blocks