1

ADD a tag to an item with command

Bismuth_Bi's Avatar Bismuth_Bi3/27/17 1:32 pm
1 emeralds 429 3
3/31/2017 2:46 pm
Bertiecrafter's Avatar Bertiecrafter
Hello!
I'm working on a PvP map nd I want to make custom weapon, but I have to find how to reduce the number of commad block I use (curently a lot!!).
So, is there a way to add a tag (enchant for exemple) to an item? Adn by this, I really want to say "add", not "set"! Exm=emple, if i drop a diamon sword on the ground with sharpness 3, I want to add a knockback enchantement. I know if I use entitydata, it will set the tag and the sword will only have the knockback enchant. So, there is a way to ADD a tag?

Thanks a lot,
Bismuth_Bi
Posted by Bismuth_Bi's Avatar
Bismuth_Bi
Level 1 : New Miner
0

Create an account or sign in to comment.

3

1
03/31/2017 2:46 pm
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
what.... 100,000?! Prove it!

You can tag (scoreboard) players using the SelectedItem tag (NBT), then execute a /enchant command for all players with the scoreboard tag.

Other than that, you can't "add" nbt tags that already exist.
Although please check if using /entitydata with the new enchant really doesn't work...

I managed to rename a damaged item that was thrown on the ground. Both the name and the damage value are inside the "Item" tag of the item.
1
03/31/2017 12:08 pm
Level 1 : New Miner
Bismuth_Bi
Bismuth_Bi's Avatar
OK, thanks. I already knew that the / enchant added an enchantment, but I'm looking for an alternative to the level limit. Thank you for answering (although this is not the answer I wanted;)). If you ever have an illumination and you're finding a method to reduce my command number (I'm currently using 100,000 command blocks), I'm open to everything!

Thanks a lot!
1
03/27/2017 3:06 pm
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
Not really, you can't prevent it from overwriting previous enchantments. /enchant is a thing and it actually adds enchantments, but you're only able to target players with it (it will try to apply the enchantment to the item that the player is holding) and you can't apply enchantments that you won't be able to get on items in survival.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome