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]
So looks like we can type an entity name right into the command! And it looks like we get two options for the command too!
You use the top version if you want to use a spawn event in your /summon
command. If you don't want to use a spawn event, you can use the bottom version.
For example, to replicate the JE command in the question:
/summon zombie TheUndead ~ ~ ~
If you want to use a spawn event...
/summon zombie ~ ~ ~ minecraft:as_baby TheUndead
Note though, that if your mob name contains spaces, you must surround the name with double quotes "
. If, while doing so, you need to include a double quote as part of the name, escape them with a backslash \
before each one.
/summon zombie "Hello! My name is \"The Undead\"." ~ ~ ~
Browse more workarounds for getting/setting NBT in Bedrock Edition
You can make a baby mob by applying the appropriate spawn event in the /summon
command.
For drowned and zombies, it is minecraft:as_baby
, and for other mobs, it is minecraft:entity_born
.
To summon a baby zombie or drowned:
/summon <zombie/drowned> X Y Z minecraft:as_baby
And to summon a baby animal:
/summon <entity type> X Y Z minecraft:entity_born
This does not work with villagers due to a bug.
Best Answer
Unfortunately, there are no NBT tags on Minecraft Bedrock, but two of those three are possible to do with commands. While you can't remove a mob's AI, you can keep it in one location by placing an always active repeating command block with the command
tp @e[type=<entity_name>] <x> <y> <z>
. For example,tp @e[type=zombie] 0 4 0
which on a superflat world would keep the zombie in place at 0, 0.To make an entity invulnerable, you need to use
/effect
. For the zombie, useeffect @e[type=zombie] resistance 1000000 255 true
. This will apply Resistance 255 to the zombie for 1000000 seconds without particles.I am unaware of a way to make any entity silent through commands, unfortunately, but at least those two are able to be done.