How can I make my custom blocks &quot;have&quot; NBT data, such as damage values, or full blown custom NBT tags?  My specific case is adding a &quot;luck&quot; component to my custom block, which can be anywhere between -100 and 100, and depending on that value, when placed and broken in the world, would do something different, for example, if the value is positive, it would drop a diamond, when it's negative it would summon primed tnt, and if it's zero it would create a dirt hut. I think I can work those out, but I first need my block to be able to store data. Thank you for your time.
5717
This question was recently split into different questions for each workaround. See   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:[&quot;Wooden planks&quot;]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:&quot;emerald&quot;,Count:5b},sell:{id:&quot;diamond_sword&quot;}}]}} summon tnt ~ ~ ~ {Fuse:20s}
42003
For theming reasons I'd like to add a specific class at the "block" level to some of the blocks I'm generating with a custom module. I know there is a module , but I would rather like to do it directly in code (there is no need to change is afterwards).   I also know of , but that does not seem to allow adding or editing classes.  Is it possible to add a class with to a block from within my module code? I'm using Drupal 7.
64083
I am working on a command block contraption on my server that involves armor giving you certain potion effects.  /execute if entity @p[nbt={Inventory[{Slot:100b,id:"minecraft:leather_boots",tag:{display:{Name:"{\"text\":\"Frog Boots\"}"}}}]}] run effect give @s jump_boost 1 1 true  However, it only works if the boots are named in an anvil. How would I write the command if I wanted to test if the player was wearing boots named "Frog Boots" in bold and green text?
1938
Are you looking for how to use /setblock with blocks with data? See .  How do I get a block with data in my inventory so I can place it myself? In Java Edition, these commands work: give @s chest{BlockEntityTag:{Items:[{id:&quot;diamond&quot;,count:10b}]}} give @s sign{BlockEntityTag:{Text1:&quot;{\&quot;text\&quot;:\&quot;foo\&quot;,\&quot;bold\&quot;:true}&quot;}}  How can I do this in Bedrock Edition, where there is no access to NBT tags from commands?
38388
In Java Edition, I can name a mob by using NBT tags like this: /summon zombie ~ ~ ~ {CustomName:'{&quot;text&quot;:&quot;TheUndead&quot;}'}  But in Bedrock Edition, I've heard NBT is not accessible from commands. What can I do to summon a mob with a custom name tag using the /summon command?
30967
I was using this command to use a custom crafting table:  /execute @a ~ ~ ~ detect ~ ~-1 ~ dropper 1 {Items:[{id:minecraft:blaze_rod,Slot:1b,Count:1b,Damage:0s},{id:minecraft:blaze_rod,Slot:4b,Count:1b},{id:minecraft:stick,Slot:7b,Count:1b}]} /scoreboard players set @p LSC 1   But I get this error message when I stand on a dropper with these items:     Failed to execute '{Items:[{id:minecraft:blaze_rod,Slot:1b,Count:1b,Damage:0s},{id:minecraft:blaze_rod,Slot:4b,Count:1b},{id:minecraft:stick,Slot:7b,Count:1b}]} /scoreboard players set @p LSC 1' as TrevMCC38   By the way, Im in 16w06a
9104
Often, when making a command block contraption, you need to set an entity's data tag. These tags can sometimes be very long, with many layers of nested curly and square brackets. For example, this is the command to summon a villager with a single custom trade:  /summon Villager ~ ~ ~ {Profession:3,Career:2,Offers:{Recipes:[{buy:{id:minecraft:diamond,Count:6b}},sell:{id:minecraft:diamond_hoe,tag:{ench:[{id:16s,lvl:10s}]}]}}   The single-line command block interface of Minecraft makes it incredibly difficult to find and fix errors, especially when it comes to mismatched brackets. In fact, for illustration purposes, I put an error in the above command.  What techniques can I use to find and fix unbalanced square or curly brackets when writing long and complicated data tags?
6827
Okay, so I've been searching all over the internet for an explanation of data modify ever since I heard Sethbling passively mention it in one of his videos. The only  thing I could find on it was the wiki and the update log for the 1.14 snapshot. So, I checked these, and they hardly explained it at all. I can get /data modify block 123 20 123... and that's as far as I get.  Minecraft wiki does not at all define clearly what  is (the thing meant to go after coords), nor does it specify what each operation does to what. Operations include (without explanation, and excluding set (which it does explain)): append, insert, merge, and prepend. Then, it has from|value as the next option, which aren't explained either. After this, it just has block/entity and coords/id. So, I know the format (mostly), but I haven't the slightest idea what any of it means. And nothing I've seen on the internet even mentions the command save for Minecraft wiki itself.  Please explain if you know what data modify is. Thanks!
120537
I have a Minecraft 1.8.1 vanilla server and would like to reward certain users. I would like to /give some users a 99999/99999 durability renamed Diamond Pickaxe (with all enchantments on it). How do I use commands to change/repair the durability of items? If possible, using only one command and use /give.
5781
I want to be able to give an entity damage for a command I’m making, but instant damage effect is way too much, how do I apply other amounts of damage with command blocks?
124221
How can I give  myself an item with a custom name, and how can I search for a player holding an item with a certain name.  This is what I tried:  /give @p minecraft:acacia_button{display:{Name:"ieat",Lore:[ieat]}} 1   It only gave me a regular acacia button.
73193
When I render I see a solid cube which is Adaptive domain. But it shouldn't show up. I feel like I missed something. It is my first time simulating fire.  Candle with a solid domain blocking the fire    The material seems to be plugged in to the volume already :/  Node setup
105677
I am making a Sell Shop, but I need to replace some things using /setblock.  For one of the replacements, I am using the command:  /setblock 579 62 1053 minecraft:command_block 0 replace {Command:"testfor @p {Inventory:[{id:"minecraft:log",Count:32b}]}",TrackOutput:0}  But it won't work! When I try it using a Command Block, I get this message:     [19:14:38]   Data tag parsing failed: Unexpected token 'm' at: minecraft:log",Count:32b}]}",TrackOutput:0   Is there any way I can fix this?
3748
I just logged in to Minecraft after maybe 8-9 months at the most. When I first logged in, I tried to switch between modes but I forgot how, so I looked for it and it said to press F1. Before I did I could destroy and place blocks, but now I can't destroy them! Is this common, and does anyone know how to fix it? And btw, whenever I go onto a bare hand to destroy something, it just goes back to the first item in my inventory.
100811
I'm trying to make a setup with command blocks that summons lightning at the location of a shot arrow. The setup should recognize the arrow that is shot or the bow that is used by its name or another property, so that lightning only strikes at that specific arrow.   Also, the lightning should only strike once when the arrow hits the ground. I know this is somehow possible with scoreboard, but I'm no good with that. Does anyone know how to make a Lightning Bow in vanilla Minecraft?
46142
I created a file   touch /datastore/virtual/pseudoblock   created a loop device with it  sudo losetup /dev/loop0 /datastore/virtual/pseudoblock   (although I got a warning about its size)  and then initialized it with random data  dd if=/dev/urandom of=/dev/loop0 bs=1M count=100   My questions are  a) why is it not displayed yet in my block devices' list?  NAME                     MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT sdb                        8:16   0 489.1G  0 disk   ├─sdb2                     8:18   0   488M  0 part  /boot ├─sdb3                     8:19   0 488.1G  0 part   │ └─sdb3_crypt           253:0    0 488.1G  0 crypt  │   ├─ubuntu--vg-root    253:1    0 472.2G  0 lvm   / │   └─ubuntu--vg-swap_1  253:2    0  15.9G  0 lvm   [SWAP] └─sdb1                     8:17   0   512M  0 part  /boot/efi sda                        8:0    0 931.5G  0 disk   └─sda1                     8:1    0 931.5G  0 part     └─sda1_crypt           253:3    0 931.5G  0 crypt      └─store--vg-store1tb 253:4    0 931.5G  0 lvm   /datastore   b) how can I permanently mount it via /etc/fstab since I cannot get its UUID?  $ blkid /dev/mapper/sdb3_crypt: UUID="fSHjbj-51K2-QfhI-G0Wb-o3lN-4pE1-BB4wCP" TYPE="LVM2_member" /dev/mapper/ubuntu--vg-root: UUID="9e452886-4d8g-fj54-854c-80bc171826e8" TYPE="ext4"   working on   $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 16.04.5 LTS Release:    16.04 Codename:   xenial   with  $ uname -a Linux pkara-pc01 4.15.0-42-generic #45~16.04.1-Ubuntu SMP Mon Nov 19 13:02:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
8544
In Minecraft Java Edition, one can summon baby zombies and drowned using the IsBaby NBT tag: /summon zombie X Y Z {IsBaby:1b}  Likewise, one can summon baby breedable mobs (Pigs, Cows, etc.) by giving them a negative Age NBT tag (the number of ticks until the mob grows up): /summon cow X Y Z {Age:-100000}  Since NBT is inaccessible from commands in Bedrock Edition, the above commands will not work there. How do I summon baby mobs in Minecraft Bedrock Edition?