I'm attempting to give a player an enchanted sword using the following command:
/give @p diamond_sword 1 0 {"ench":[{"id":5,"lvl":1}]}
Why do I see this error?
This copied from example for Bedrock Edition, but not working.
The only "components" supported are can_place_on
and can_break
. Nothing else.
You will have to externally edit items (MCC Toolchest PE, Universal Minecraft editor, etc.) or just enchant them ingame.
There is not a way to use this command, as there is no NBT access, except for the can_place_on
and can_break
tags. This is quite upsetting, as I wish to use commands on my switch to recieve a God Bow (/give @p minecraft:bow{display:{Name:"{\"text\":\"God Bow\"}",Lore:["The Best Bow in The World!","Will Shoot Zeus's Lightning Bolts!"]},Unbreakable:1b,Enchantments:[{id:"minecraft:power",lvl:100000},{id:"minecraft:punch",lvl:100000},{id:"minecraft:flame",lvl:100000},{id:"minecraft:infinity",lvl:1},{id:"minecraft:mending",lvl:100000}]} 1
). I really hope Mojang AB Updates that soon.
can_place_on
andcan_break
as @Pepijn pointed out in this answer below.