Minecraft Blogs / Tutorial

Minecraft Command Blogs | Data tags [1.13+]

  • 6,955 views, 3 today
  • 9
  • 9
  • 8
Pepijn's Avatar Pepijn
Level 57 : Grandmaster Cyborg
382
Minecraft | Command Blogs
By Pepijn
Data tags

What are they?
Data tags are Minecraft's in game representation of NBT. But what does this mean? First of all, NBT is how Minecraft stores a bunch of information about the game so when you close the world and open it again everything is still the same. NBT has always been used by Minecraft, but only since 1.7.2 have we been able to manipulate NBT this directly using data tags in commands. A lot has changed since then, especially in 1.13, but this idea behind data tags is still the same as ever.

How to use them?
Data tags are used by commands in two different ways: reading and writing. Reading is probably better understood by calling it "testing", you can use the nbt argument selector to further narrow down your search:

/execute as @e run say hello world will make every loaded entity in the world say "hello world"
/execute as @e[nbt="{OnGround:1b}"] run say hello world will only make every loaded entity touching the ground say "hello world"

This is just a quick example. I will get into more detail about the format later.

The other way, writing, is also not that hard to understand. Instead of testing for something, we're setting it. Multiple commands are able to do this, but we will take /summon as an example:

/summon zombie ~ ~ ~ will summon a regular zombie.
/summon zombie ~ ~ ~ {Invulnerable:1b} will summon an invulnerable zombie.

WIP
Tags

Create an account or sign in to comment.

1
05/23/2015 12:07 am
Level 1 : New Miner
robulus1973
robulus1973's Avatar
How might one use the following command to fill a chest not with stone as below but with stone:1 (granite)? Or to ask another way, how does one specify the variant as granite, etc.?

blockdata ~ ~1 ~ {Items:[{id:stone,Count:1,Slot:0}]}
1
05/23/2015 4:13 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
By using "Damage:", so blockdata ~ ~1 ~ {Items:[{id:stone,Damage:1,Count:1,Slot:0b}]} will put a granite (id:stone with damagevalue of 1) in the chest.
1
02/13/2015 11:23 pm
Level 13 : Journeyman Engineer
ronsampaul
ronsampaul's Avatar
What are the firework color codes? I can't seem to find them anywhere. Also, when I try to launch the fireworks using the summon command it kicks me and the people in a close proximity off the server. What should I do? Thanks. Please PM me when you have or can give me the answer.
1
02/16/2015 2:39 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
1
06/21/2014 9:50 pm
Level 3 : Apprentice Artist
wep753
wep753's Avatar
this page really helps me out alot, thanks!
1
06/22/2014 6:45 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
Really glad it helped you :), just be aware that the datatag list is a bit outdated, because you can now use datatags with /testfor (This means you will be able to use datatags that you couldn't use before, like Health and OnGround/InGround). But everything that is in here will still work.

If you want to see a list of all/most datatags you can use, I suggest you take a look at these:
http://minecraft.gamepedia.com/Player.dat_format (For players, can't be used with /summon or anything, they are just for /testfor. For example /testfor @p {foodLevel:6}. You can also find the datatags for Items (enchantments, fireworks etc.)
http://minecraft.gamepedia.com/Chunk_format (for mobs and other entities, in 1.7 you can only use them with /summon, but because of @e in 1.8, you can use these for /testfor as well (in 1.8))
1
02/04/2014 2:07 am
Level 1 : New Miner
jessefjxm
jessefjxm's Avatar
Really helps a lot!thx~
1
02/04/2014 8:25 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
thanks! really glad it helped someone :)
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome