1
ADD a tag to an item with command
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
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
Create an account or sign in to comment.
3
1
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.
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
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!
Thanks a lot!
1
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.