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
Computers
You can do this with the “pick block” control, which defaults to the middle mouse button. Put your crosshair over the block you want to get and then press Ctrl + pick block, which will put that block with its data into your inventory. Of course, this will only work in creative mode.
Touch devices
Unfortunately, this cannot be done on touch devices without “Full Keyboard Gameplay” enabled, as there is no “pick block” control.
Consoles
Consoles do not have the pick block control assigned by default, and it will have to be configured in the settings window.
For more information on the “pick block” control, see Controls on the Minecraft wiki.
Best Answer
You can do this with the
minecraft:become_charged
spawn event:If you want to also give it a custom name, put the name after the spawn event:
Note: Only one spawn event can be used when summoning a mob, so you cannot use other spawn events such as
minecraft:start_exploding
when summoning charged creepers.