Tag! You’re it! – Actually not a bad analogy for the tag command! /tag is simple, but very powerful. A tag is literally just a piece of text and every entity in the world has a list of tags associated with it. Each entity is born into the world with no tags on it, but they can be added and removed with /tag. Let’s place down an armor stand (convenient because it won’t run away). While looking directly at it, type /tag, and after a space, you will see a list of all The @ selectors, all the online players, and the ID of the entity you are looking at. Select that ID and type another space. Now we can pick “add” to add a tag, then type whatever we want to be a tag! I’ll add a tag called “test.” Now we can select this entity by doing @e[tag=test]. To prove that it worked I’ll test it with /say @e[tag=test] Just like that. It’ll make me say a list of all entities tagged with test. Armor stand! Very nice. To get rid of the tag, we can run a tag command just like before, but instead of adding the tag we choose remove. Ok cool. I’m sure you could have figured all that out by yourself. But what is /tag commonly used for? Tags are great for keeping track of entities permanently or temporarily! By the way, I’m gonna be using Visual Studio Code to make a datapack for this tutorial because I think it’s a little easier to write, a little easier to understand- but if you’ve never used it before you should check out my datapack tutorial! I’ll run you through how to set it up real quick in that video. Alright you good to go? Great. Let’s say we want to make a function that gives everyone except you a cooked porkchop. First, we can do /tag @s add self. This will add a tag to the person who runs this function (so, @s). Then we can give @a[tag=!self] cooked_porkchop. The ! means NOT, so everyone without the self tag. Then, we just remove the tag with /tag @s remove self. Great now let’s test it in game! Oh wait. It’s just me in here. Okay, for a permanent tracking example let’s say we want to make all zombies spawn with an iron sword. We can do /replaceitem entity @e[type=minecraft:zombie,tag=!sword] weapon.mainhand iron_sword Then, do /tag @e[type=zombie,tag=!sword] add sword, so every zombie that hasn’t been given a sword we’ll add the sword tag- so that they Aren’t constantly getting new swords and to reduce lag. You can summon an entity with tags pre¬-applied as well. This is super useful when you want to do something with an entity as soon as it spawns. To do this, summon your entity as normal and then at the end in the NBT tags add a tag called “Tags” and fill it out like this {Tags:[“tag1″,”tag2″,”tag3”]} tag1, tag2, and tag3 are just examples here, obviously. You can have as many or as few as you want. Now we’ve summoned an armor stand with three tags. Excellent. To add on to this, you can make spawn eggs that spawn pre-tagged mobs! The command for that looks like this. I’ll put this and any other commands in the description for you to copy and paste. In summation, tags are incredibly useful, and are the main way to keep track of entities with commands. Because of that, there’s no main use case for them. They’re just used for everything! Getting comfortable manipulating tags to do your bidding is a crucial step to becoming a necromancer I mean datapack creator. Tags tie in extremely well with the /execute command, so if you don’t know how to use it yet, you should go check out my tutorial on it! This is also a great time to learn about datapacks, go watch my tutorial on them here. My name is Legitimoose and thank you for watching! Video Information
This video, titled ‘Minecraft TAG Command Tutorial [Working 1.19]’, was uploaded by Legitimoose on 2021-02-04 14:00:13. It has garnered 93197 views and 2547 likes. The duration of the video is 00:04:17 or 257 seconds.
Learn how to use the Minecraft tag command in Minecraft 1.16/1.17/1.18/1.19 and above! You’ll learn how to spawn entities with a tag using spawn eggs or /summon, how to select all other players EXCECPT you, and how to make mobs spawn with certain attributes (such as holding an iron sword!) The /tag command is one of the most important commands for detecting entities in datapacks and command creations. It’s used to *tag* entities so you can refer to them later.
Mentioned commands: /summon armor_stand ~ ~ ~ {Tags:[“tag1″,”tag2″,”tag3”]} /give @p chicken_spawn_egg{EntityTag:{Tags:[“test”]}}
===l o n k s=== Discord Server [ https://discord.gg/n7z4sVG ] Twitter [ https://twitter.com/Legitimoose ] Twitch [ https://www.twitch.tv/legitimoose ] My Editor [ https://www.instagram.com/ciara_millinery/ ] Business Email [ legitimoose at gmail dot com]
In this Minecraft tag command tutorial, you’ll learn how to use tag command in minecraft 1.16 java! The /tag command in Minecraft is extremely important for datapack creation, and is used for almost anything involving detecting entities/entity/mobs. If you want to detect all players except yourself, or give everyone else an item, or assign all other players to a team, you can use /tag with a datapack function! I’ll also show you how to make a mob spawn with a certain item, or how to make mobs/zombies spawn with attributes such as more health, or increased follow range (this can be done with /data merge or /attribute if you were wondering.) This is one of the most useful minecraft commands for using in data packs, so if you’ve ever wondered how minecraft tags work, now you know! ~Metadata soupsmith