1
Just what the title says, can someone explain to me Data Tags?
Create an account or sign in to comment.
10
1
Ok, before you get mixxed up with command block noobs, let me teach you some stuff. First a data tag is just a piece of a command that allows the game to specify specifics of usually some kind of entity, item, or block. An example of a Data tag would be /summon Pig ~ ~ ~ {Motion:[0:3.0,1:2.0,2:0.0]}
{Motion:[0:3.0,1:2.0,2:0.0]} is the data tag. You can learn more about data tags from the Minecraft Wiki and the Minecraft Forums. I hope this helped!
{Motion:[0:3.0,1:2.0,2:0.0]} is the data tag. You can learn more about data tags from the Minecraft Wiki and the Minecraft Forums. I hope this helped!
1
wait you got some things wrong:
you can select a number of players with TARGETS and TARGET SELECTORS
you can select a player, eg: Bertiecrafter
or use some TARGET variables: @a @p @r @e (@f <-- idk if that is still present)
In addition, you could use some TARGET SELECTORS to define TARGET variables a bit more
DATA TAGS are keys that "define" mobs or blocks, instead of "selecting" players or mobs. They can be used in /summon, /testfor, /entitydata, /tellraw, /title and more.
you can select a number of players with TARGETS and TARGET SELECTORS
you can select a player, eg: Bertiecrafter
or use some TARGET variables: @a @p @r @e (@f <-- idk if that is still present)
Click to reveal
@a: everybody (/tp @a x y z, will tp everybody to x, y, z)
@p: nearest person
@r: random person
@e: all entities (mobs, items, players, item frames, armor stands, etc etc)
@f: farthest person
@p: nearest person
@r: random person
@e: all entities (mobs, items, players, item frames, armor stands, etc etc)
@f: farthest person
In addition, you could use some TARGET SELECTORS to define TARGET variables a bit more
Click to reveal
use l for max xp levels, lm for min xp levels, c for count, type for mob type
eg: /kill @e[type=Zombie] will kill all zombies
eg: /kill @p will kill the nearest player
eg: /kill @a[lm=1] will kill all players with a xp level of 1 or more.
WARNING:
use @p[c=#] to select a number of nearest players, use a negative number to select a number of farthest players (idk if that could be done with @f)
use @r[type=<mob>] to select a random MOB, instead of a player
for all target selectors and examples:
http://minecraft.gamepedia.com/Commands ... _selectors
eg: /kill @e[type=Zombie] will kill all zombies
eg: /kill @p will kill the nearest player
eg: /kill @a[lm=1] will kill all players with a xp level of 1 or more.
WARNING:
use @p[c=#] to select a number of nearest players, use a negative number to select a number of farthest players (idk if that could be done with @f)
use @r[type=<mob>] to select a random MOB, instead of a player
for all target selectors and examples:
http://minecraft.gamepedia.com/Commands ... _selectors
DATA TAGS are keys that "define" mobs or blocks, instead of "selecting" players or mobs. They can be used in /summon, /testfor, /entitydata, /tellraw, /title and more.
Click to reveal
All data tags consist of a "key" and a "value", separated by ","
They are all packed inside two {}
One possible key for all entities is: Riding
The value of this key is a compound, that means they need another {} with keys, separated with ","
Possible value types:
Integer: whole number, eg 2
Float: decimal number with "f" behind it, eg 0.5f
Double: decimal number, eg 0.5
String: piece of text, packed inside two ", eg: "This is some text"
Compound: A new list of defining keys and values, packed inside {}
List: A list of values...
And a few more...
To summon a Slime, riding a Ghast (info included in brackets):
/summon (command) Slime ~ ~ ~ (relative co-ordinates)
{Riding(key):{id(key):"Ghast"(String}}
or clear: /summon Slime ~ ~ ~ {Riding:{id:"Ghast"}}
For a full list of entities, keys and their values:
http://minecraft.gamepedia.com/Chunk_format
They are all packed inside two {}
One possible key for all entities is: Riding
The value of this key is a compound, that means they need another {} with keys, separated with ","
Possible value types:
Integer: whole number, eg 2
Float: decimal number with "f" behind it, eg 0.5f
Double: decimal number, eg 0.5
String: piece of text, packed inside two ", eg: "This is some text"
Compound: A new list of defining keys and values, packed inside {}
List: A list of values...
And a few more...
To summon a Slime, riding a Ghast (info included in brackets):
/summon (command) Slime ~ ~ ~ (relative co-ordinates)
{Riding(key):{id(key):"Ghast"(String}}
or clear: /summon Slime ~ ~ ~ {Riding:{id:"Ghast"}}
For a full list of entities, keys and their values:
http://minecraft.gamepedia.com/Chunk_format
1
This thread has some links to resources:
http://www.planetminecraft.com/forums/snapshot-13w36a-summon-command-creation-sharing-t304035.html
http://www.planetminecraft.com/forums/snapshot-13w36a-summon-command-creation-sharing-t304035.html
1
Dog tags are the things you get when you knife someone, yours are also displayed on the killcam when you kill someone.
Oh wait data tags not dog tags ;-;
You can find tons of information about data tags on the minecraft reddit.
Oh wait data tags not dog tags ;-;
You can find tons of information about data tags on the minecraft reddit.
1
NBT and data tags are basically two words for the same thing, as far as I'm aware. I tend to use them interchangeably.
1
One last question lol. Is there anywhere I can learn Command Blocks and NBT Tags etc. more in depth, other than the wiki, to me the wiki looks like gibberish to me, so I am wondering where I can find some place that puts it in simpler terms.
1
I highly suggest this page for information over commands, usage, etc. This should cover every single vanilla Minecraft command as well as placeholders and more.
http://minecraft.gamepedia.com/Commands
If you have any questions you could also check out my server: Play.GreenRaids.com - I'm more likely to be on there than I am to be on PMC. It's a vanilla snapshot server, currently the version is 15w42a. Everything runs off of command blocks and scoreboards.
http://minecraft.gamepedia.com/Commands
If you have any questions you could also check out my server: Play.GreenRaids.com - I'm more likely to be on there than I am to be on PMC. It's a vanilla snapshot server, currently the version is 15w42a. Everything runs off of command blocks and scoreboards.
1
A data tag is just a tiny piece of information to describe a certain characteristic of an entity. You can see all data tags an entity has by standing next to it and running this command: "/entitydata @e[r=2] {}" which will list all data of any entity within two blocks. You can also add/edit data tags by doing "/entitydata @e[r=2] {data tag}" and of course, the placeholder can be changed to your liking in either situation.
@e[r=2,type=Chicken] will target all chickens within two blocks.
@e[rm=2,type=Chicken] will target all chickens greater than two blocks from you.
These are only two examples of placeholders. There are practically infinite combinations you can use, with anything from scoreboard scores to radius to health. But I'm starting to get off track. Hope that answered your question.
@e[r=2,type=Chicken] will target all chickens within two blocks.
@e[rm=2,type=Chicken] will target all chickens greater than two blocks from you.
These are only two examples of placeholders. There are practically infinite combinations you can use, with anything from scoreboard scores to radius to health. But I'm starting to get off track. Hope that answered your question.
1
What about NBT tags, or are they the same thing?
1