6

In Java Edition, I can name a mob by using NBT tags like this:

/summon zombie ~ ~ ~ {CustomName:'{"text":"TheUndead"}'}

But in Bedrock Edition, I've heard NBT is not accessible from commands.

What can I do to summon a mob with a custom name tag using the /summon command?


Browse more workarounds for getting/setting NBT in Bedrock Edition

1 Answer 1

8

A space for a name is now included in the /summon command.

Let's look at the documentation for the command, specifically the syntax.

summon <entityType: EntityType> [spawnPos: x y z] [spawnEvent: string] [nameTag: string]
summon <entityType: EntityType> <nameTag: string> [spawnPos: x y z]

This allows us to enter a custom entity name directly into the command. The difference between the two versions is for whether you want to use a spawn event or not.

For example, to replicate the JE command in the question:

summon zombie CustomZombieNameHere ~ ~ ~

If you want to use a spawn event, it would look like this:

summon zombie ~ ~ ~ minecraft:as_baby CustomBabyZombieNameHere

If your desired custom mob name contains spaces, you must surround the name with quotation marks ". If, while doing so, you need to include a quotation mark as part of the name, escape them with a backslash \ before each one.

summon zombie "Hello! My name is \"John\"." ~ ~ ~
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .