Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition?

Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition? - Adult bearded mechanic in casual wear standing near window in workshop and browsing digital tablet

This question was split into different questions for each workaround. See these two meta posts for more information.


Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like:

give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}}
give @s stone_pickaxe{Unbreakable:1b}
give @s item_frame{EntityTag:{Invisible:1b}}
summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"emerald",Count:5b},sell:{id:"diamond_sword"}}]}}
summon tnt ~ ~ ~ {Fuse:20s}


Best Answer

This is only possible for giving potions, using CanPlaceOn and CanDestroy, and the {powered:1} section of the creeper, although the syntax is slightly different. Based on other answers here, we know that it is impossible to add NBT tags in Bedrock Edition. However, there are loopholes for the items above.

For the potion, we'll use the data integer of 5, meaning Night Vision for 3 minutes. Link here: https://www.digminecraft.com/generators/give_potion_pe.php

/give @p potion 1 5

Here is a table of the possible values: Potion Table

For the stone, we can use JSON components for the abilities to place on certain items. This only works in adventure mode.

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

Finally, for the powered creeper, we can utilize spawn events to make this possible in Bedrock Edition.

/summon creeper ~ ~ ~ minecraft:become_charged

I hope this helps!




Pictures about "Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition?"

Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition? - High angle of pensive African American female freelancer in glasses and casual clothes focusing on screen and interacting with netbook while sitting at table with glass of yummy drink on cafe terrace in sunny day
Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition? - Young troubled woman using laptop at home
Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition? - Woman working retouching photo on laptop at convenient workplace



How do you use NBT bedrock in Minecraft?

You can add, list and remove player tags using the /tag command in Minecraft. This is a very useful command to target and tag players in a multiplayer game. TIP: Starting in Minecraft Java Edition (PC/Mac) 1.13, the /tag command replaces the /scoreboard players tag command to set up and manage tags for players.

How do you put tags on bedrock in Minecraft?

NBT tags are used in game commands such as: /summon, /data, /give, /fill, /setblock. The NBT tag is always surrounded in {} such as {NoAI:1}. If there is more than one NBT tag used in a command, the NBT tags are separated by a comma such as {NoAI:1, IsBaby:1}. Each entity (or mob) has its own unique set of NBT tags.



The nbt data in Minecraft bedrock and how to use them in commands. (nbt minecraft bedrock)




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Andrea Piacquadio, Andrea Piacquadio, Andrea Piacquadio, George Milton