6

How do you add NBT tags to commands? I’ve tried commands that normally work in Java Edition like:

give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}}
give @s potion 1 0 {Potion:"minecraft:night_vision"}
give @s diamond_sword 1 0 {ench:[{id:16,lvl:5}]}
give @s minecraft:stone 1 0 {CanPlaceOn:["minecraft:grass","minecraft:dirt"]}
summon creeper ~ ~ ~ {powered:1,CustomName:"Powered Creeper"}
6

Unfortunately, this is not possible in PE or BE (Bedrock Edition) except for the "can_place_on" or "can_destroy" tag:

/give @s stone 1 0 {"can_place_on":{"blocks":["grass","dirt"]}}

This gives yourself 1 stone that can be placed on grass and dirt.

/give @s iron_shovel 1 0 {"can_destroy":{"blocks":["grass","dirt"]}}

This gives yourself 1 iron shovel that can destroy grass and dirt.

  • 3
    Hm, nice self-answered question. I usually close these questions as duplicate of some random alike question of that category, now I can use this. Thanks! – Fabian Röling Jun 22 '18 at 22:10
-1

At the current time, Mojang is supposedly working on a "Component" system which is supposed to let players on Bedrock and Pocket Editions use Data/NBT tags, such as the command /summon creeper ~~~ {powered:1} or /give @s diamond_sword 1 0 {Unbreakable:1}. I do not know when it will be finished, but you will have to wait at least another 2-3 months, I'm guessing. I will get back to you if I find out.

protected by Community Jul 11 at 15:03

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.