Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Data Tag Command


  • Please log in to reply
41 replies to this topic

#1

DirtTNT
    DirtTNT

    Zombie Killer

  • Members
  • 206 posts
  • Location: Brazil
  • Minecraft: DirtTNT

Posted 05 September 2013 - 08:09 PM

The Data Tag command works in every command that accepts NBT data value. For example: ./give or ./summon (new command)

A lot of people got confused with this new feature, so I'll try my best to explain.

FOR ./GIVE COMMAND:

If you want to give someone a Diamond Sword (id 276), you'd type:
/give @p 276
Right? But for adding a new Data Tag command we need to put 2 new variables before the ID. Those variables are: COUNT and DAMAGE. If you want to give more than 1 sword, the first tag needs to be this number. e.g.:
/give @p 276 64
And if you you'd like to damage the sword a bit, you'll need to add a number which is lower or equal to the respective maximum damage. e.g. Fishing Rod maximum damage is 64.
/give @p 346 0 48

But that's not the point. We need to add Data Tag, so just put empty variables (Count >= 1). To start off the tag, add brackets and type "display:". In this you can put Name and Lore(description). E.G.:
/give @p 276 1 0 {display:{Name:"Awesome",Lore:["It is awesome"]}}

And to add an enchantment, just put it in the last but one curly brackets, add a ',' and type ench[]
In this brackets you want to put id:"*",lvl:"*" Obviously id means the Enchantment ID and lvl is the Level. You can download a pretty light text file I wrote to get those IDs.e.g.:

/give @p 272 1 0 {display:{Name:"Glory",Lore:["Used for deadly combat"]},ench:[id:"16",lvl:"5"]}

Download TXT File

So that's it for this topic. I hope this is useful for you and yeah... Leave you feedback and stuff. Bye.
~~DirtTNT
My name is Dirt. DirtTNT

Register or log in to remove.

#2

Ni
    Ni

    Stone Miner

  • Members
  • 86 posts

Posted 05 September 2013 - 08:16 PM

Can you add attributes like increase max health and attack damage on an item?
Lame signature

#3

Prime_Jetspace
  • Location: Iacon
  • Minecraft: Prime_Jetspace

Posted 05 September 2013 - 08:32 PM

Thanks a lot! I was looking for some info on specifically this. Is this possible to do with /summon? I tried this:

/summon Skeleton ~ ~ ~ {SkeletonType:1},{Invulnerable:1}

but I got the error "Data tag parsing failed: Encountered multiple top tags, only one expected." So I tested something, and this:

/summon Skeleton ~ ~ ~ {SkeletonType:[1}],{Invulnerable:1}

...Led to the error "Data tag parsing failed: Unbalanced curly brackets {}: {SkeletonType:[1}],{Invulnerable:1}" and I can't figure out how to solve this in order to add 2 data tags to the Skeleton.
I've tried several ways mimicking your example (replacing them with these two data tags, of course), but most result in the unbalanced curly brackets error.

Posted Image

This mod deserves every byte of support it gets.


#4

minihilly
    minihilly

    Glowstone Miner

  • Members
  • 3394 posts
  • Location: Here.
  • Minecraft: minihilly

Posted 05 September 2013 - 08:46 PM

A user also noticed that Attributes DO work with this system:

View PostMlakussInMC, on 05 September 2013 - 07:14 PM, said:

Ok, I did it ! Diamond sword with attribute modifier (yes, it works).

Here's the command:
give @p 276 1 0 {AttributeModifiers:[0:{AttributeName:"generic.attackDamage",Name:"generic.attackDamage",Amount:50,Operation:0,UUIDLeast:894654,UUIDMost:2872}]}

I think I'm going to do example of every modifications possible to juste have to copy/paste when I want to create an item.

And thanks for the coma. I was trying to do with ";" but it makes my game crash.

Credit to them for it.
I'm also proud to seemingly be one-of-the-first to work out the new syntax c:


#5

DirtTNT
    DirtTNT

    Zombie Killer

  • Members
  • 206 posts
  • Location: Brazil
  • Minecraft: DirtTNT

Posted 05 September 2013 - 09:22 PM

View Postminihilly, on 05 September 2013 - 08:46 PM, said:

A user also noticed that Attributes DO work with this system:


Credit to them for it.
I'm also proud to seemingly be one-of-the-first to work out the new syntax c:
Thanks for the explanation! ;-) Saved my time
My name is Dirt. DirtTNT

#6

correiajoao
  • Location: Santarém, PORTUGAL
  • Minecraft: correiajoao

Posted 05 September 2013 - 09:42 PM

View PostPrime_Jetspace, on 05 September 2013 - 08:32 PM, said:

/summon Skeleton ~ ~ ~ {SkeletonType:[1}],{Invulnerable:1}

I think that u only need to put } at the end:

/summon Skeleton ~ ~ ~ {SkeletonType:1,Invulnerable:1}

PS: I have tested it, and yes is this code ;P

Posted Image
Great Adventure Map!


#7

Prime_Jetspace
  • Location: Iacon
  • Minecraft: Prime_Jetspace

Posted 05 September 2013 - 11:29 PM

View Postcorreiajoao, on 05 September 2013 - 09:42 PM, said:

I think that u only need to put } at the end:

/summon Skeleton ~ ~ ~ {SkeletonType:1,Invulnerable:1}

PS: I have tested it, and yes is this code ;P

Whoa. Thanks! I thought it would be more involved than just putting commas between the data tags.

Posted Image

This mod deserves every byte of support it gets.


#8

MCmacjuul
  • Minecraft: macjuul

Posted 06 September 2013 - 05:39 PM

How do you use this with the Motion tag? something with Motion:[]?
Posted Image   Posted Image

Join Creep Craft now! 83.160.61.11
SURVIVAL | CREATIVE | MINI-GAMES | FACTIONS | PLOTS

#9

minihilly
    minihilly

    Glowstone Miner

  • Members
  • 3394 posts
  • Location: Here.
  • Minecraft: minihilly

Posted 06 September 2013 - 05:52 PM

View PostMCmacjuul, on 06 September 2013 - 05:39 PM, said:

How do you use this with the Motion tag? something with Motion:[]?
I don't know much about NBT tags, as I'm one to use MCEdit for that, and the new syntax is still being worked out.

I'd assume something like:
{Motion:[dX:[100]]}
would do the trick, but after trying it doesn't seem to work...

Could you expand on exactly what you want to achieve, it might help for when entering the command?
As I don't get the usage of the Motion tag myself


#10

Retic
    Retic

    Redstone Miner

  • Members
  • 635 posts
  • Location: I liv- oh wait, where I live is secret :O
  • Minecraft: PokeShot2316
  • Xbox:Hot Shot2316
  • PSN:Dont have one ):

Posted 06 September 2013 - 07:53 PM

How about for a Horse with speed 100,  jump 5,  and resistance 100?  command for that PLEASE?
Soldiers defeat their enemies,  but Ghosts,  haunt them.  

#11

Beza
    Beza

    Tree Puncher

  • Members
  • 38 posts
  • Minecraft: Bezatrix

Posted 06 September 2013 - 08:22 PM

where is there a list of all the possible Data Tags, and how to possibly implement them into the command system (using the brackets, quotations, colons/semicolons, etc.) ?

#12

Puredarkness

Posted 06 September 2013 - 08:34 PM

View PostBeza, on 06 September 2013 - 08:22 PM, said:

where is there a list of all the possible Data Tags, and how to possibly implement them into the command system (using the brackets, quotations, colons/semicolons, etc.) ?

On the Chunk_Format page on the minecraft wiki. Although it's missing some, it has a lot of them.
The Darkness will win one day, and light's time being the winner is nearing it's end. Because light is overrated.
People, the Modification Development section is for MODS, not Bukkit plugins. Do not be surpised if you don't get any help from there.
Spoiler: Random fact

#13

Skylinerw
    Skylinerw

    Sectional Moderator

  • Sectional Moderator
  • 3663 posts

Posted 06 September 2013 - 09:21 PM

View PostBeza, on 06 September 2013 - 08:22 PM, said:

where is there a list of all the possible Data Tags, and how to possibly implement them into the command system (using the brackets, quotations, colons/semicolons, etc.) ?

You can find a huge amount of info here, just click on the sub-links provided under "Uses": http://www.minecraft...ed_in_Minecraft

#14

Simon6689
  • Minecraft: simon6689

Posted 08 September 2013 - 11:02 PM

View PostMCmacjuul, on 06 September 2013 - 05:39 PM, said:

How do you use this with the Motion tag? something with Motion:[]?

{Motion:[0.0,0.0,0.0]}

(x velocity, y velocity, z velocity)

So, {Motion:[2.0,0.0,0.0]} would give it an x velocity of +1

#15

SuperNovaXM
  • Location: In front of my computer, probably.
  • Minecraft: Yes.
  • Xbox:What's an Xbox?

Posted 07 November 2013 - 08:33 PM

View PostNexTheRenzor, on 06 September 2013 - 07:53 PM, said:

How about for a Horse with speed 100,  jump 5,  and resistance 100?  command for that PLEASE?
/summon EntityHorse ~ ~ ~ {ActiveEffects:[{Id:1,Amplifier:100,Duration:1000000},{Id:11,Amplifier:100,Duration:1000000},{Id:8,Amplifier:5,Duration:1000000}]}
That should do the trick.  I haven't tested it, but there don't seem to be any problems, so you can just copy/paste it.
Posted Image

#16

KaizoBlade
  • Location: Planet Popstar
  • Minecraft: KaizoBlade

Posted 14 November 2013 - 10:55 PM

Can someone tell me what's wrong with this command:

/summon Cow ~ ~2 ~ {Attributes:[{Name:generic.maxHealth, Base:300.0}]}, ActiveEffects:[{Id:11,Amplifier:2,Duration:9999,Ambient:0},{Id:1,Amplifier:2,Duration:9999}]

I get the 'Data tag parsing failed: Encountered multiple top tags, only one expected.'

#17

Skylinerw
    Skylinerw

    Sectional Moderator

  • Sectional Moderator
  • 3663 posts

Posted 14 November 2013 - 11:01 PM

View PostKaizoBlade, on 14 November 2013 - 10:55 PM, said:

Can someone tell me what's wrong with this command:

/summon Cow ~ ~2 ~ {Attributes:[{Name:generic.maxHealth, Base:300.0}]}, ActiveEffects:[{Id:11,Amplifier:2,Duration:9999,Ambient:0},{Id:1,Amplifier:2,Duration:9999}]

I get the 'Data tag parsing failed: Encountered multiple top tags, only one expected.'

Here is your command with indentation for easier reading/debugging:

/summon Cow ~ ~2 ~ {
	Attributes:[
		{
			Name:generic.maxHealth,
			Base:300.0
		}
	]
},
ActiveEffects:[
	{
		Id:11,
		Amplifier:2,
		Duration:9999,
		Ambient:0
	},
	{
		Id:1,
		Amplifier:2,
		Duration:9999
	}
]

As you can see, you have ended the dataTags after the "]" closing the Attributes tag. Simply moving the comma off of the curly bracket to the square bracket, and move the curly bracket to the end of the command to close the dataTags:

/summon Cow ~ ~2 ~ {
	Attributes:[
		{
			Name:generic.maxHealth,
			Base:300.0
		}
	],
	ActiveEffects:[
		{
			Id:11,
			Amplifier:2,
			Duration:9999,
			Ambient:0
		},
		{
			Id:1,
			Amplifier:2,
			Duration:9999
		}
	]
}

Condensed:

/summon Cow ~ ~2 ~ {Attributes:[{Name:generic.maxHealth,Base:300.0}],ActiveEffects:[{Id:11,Amplifier:2,Duration:9999,Ambient:0},{Id:1,Amplifier:2,Duration:9999}]}


#18

soundlessspace
  • Location: Boone
  • Minecraft: soundlessspace

Posted 21 November 2013 - 05:03 PM

Alright, what's going on with this command?  I'm trying to figure out how to spawn a mob with enchanted armor / weapons as well as enchantments on the actual mob.  

/summon Zombie ~ ~2 ~ {ActiveEffects:[{Id:10,Amplifier:1,Duration:200,Ambient:0}]},Equipment:[{id:276,tag:{ench:[{id:16,lvl:2}]}},{},{id:300,tag:{ench:[{id:0,lvl:2}]}}]

I get the top tags error.

#19

Skylinerw
    Skylinerw

    Sectional Moderator

  • Sectional Moderator
  • 3663 posts

Posted 21 November 2013 - 05:53 PM

View Postsoundlessspace, on 21 November 2013 - 05:03 PM, said:

Alright, what's going on with this command?  I'm trying to figure out how to spawn a mob with enchanted armor / weapons as well as enchantments on the actual mob.  

/summon Zombie ~ ~2 ~ {ActiveEffects:[{Id:10,Amplifier:1,Duration:200,Ambient:0}]},Equipment:[{id:276,tag:{ench:[{id:16,lvl:2}]}},{},{id:300,tag:{ench:[{id:0,lvl:2}]}}]

I get the top tags error.

Looking at your command, right away you can see that it ends in a square bracket. It has to end in a curly bracket to close the beginning of the dataTags. For now, let's put in some indents to see what went wrong:

/summon Zombie ~ ~2 ~ {
	ActiveEffects:[
		{
			Id:10,
			Amplifier:1,
			Duration:200,
			Ambient:0
		}
	]
},
Equipment:[
	{
		id:276,
		tag:{
			ench:[
				{
					id:16,
					lvl:2
				}
			]
		}
	},
	{},
	{
		id:300,
		tag:{
			ench:[
				{
					id:0,
					lvl:2
				}
			]
		}
	}
]

With proper indenting, your code shouldn't come back against the left column until the very last line, in which the square bracket currently resides. You ended the dataTags early; just before the Equipment tag. To fix this, you simply need to move that curly bracket, as all else seems to be in working order:

/summon Zombie ~ ~2 ~ {
	ActiveEffects:[
		{
			Id:10,
			Amplifier:1,
			Duration:200,
			Ambient:0
		}
	],
	Equipment:[
		{
			id:276,
			tag:{
				ench:[
					{
						id:16,
						lvl:2
					}
				]
			}
		},
		{},
		{
			id:300,
			tag:{
				ench:[
					{
						id:0,
						lvl:2
					}
				]
			}
		}
	]
}

Condensed:

/summon Zombie ~ ~2 ~ {ActiveEffects:[{Id:10,Amplifier:1,Duration:200,Ambient:0}],Equipment:[{id:276,tag:{ench:[{id:16,lvl:2}]}},{},{id:300,tag:{ench:[{id:0,lvl:2}]}}]}


#20

soundlessspace
  • Location: Boone
  • Minecraft: soundlessspace

Posted 21 November 2013 - 06:54 PM

Thank you so much.