TransWikia.com

How do I add a tagname on a entity in Minecraft?

Arqade Asked by Didier Vermunt on September 22, 2020

I’m making a mc map and I want a zombiefied piglin walking over some blocks. I found out how to make him move, but I need a tagname for him, so it would only affect him and not the other piglins. How can I summon a entity with a NBT? I have searched almost every site and just can’t find it. I tried CustomName but then the entity was not regonised. (Sorry for bad Englisch, I’m from Netherlands). Hope someone could help me…

One Answer

The Minecraft Wiki is definitely the first place you should look for command help. If you haven't heard of it, trust me, it is a lifesaver in commands.

The command you'll want to use is the /tag commmand. This lets you tag your mob with a recognizable text string and reference it again afterwards using the same string. Like this:

/tag @e[name="THE_PIGLIN",type=piglin] add movingPiglin

To reference the tagged entity at the end, you can learn how target selectors work, specifically the tag = argument.

@e[tag=movingPiglin]

Correct answer by ExpertCoder14 on September 22, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP