Command Block /execute at all UNnamed mobs of same type
//ads -- adsterra.com -- native banner
?>
I have various named Zombies. I want to do something with all OTHER Zombies.
/execute @e[name=Zombie] ~ ~ ~ summon ArmorStand ~ ~ ~
Above does not seem to work. Any way to target Zombies that have no CustomName?
Best Answer
1.13 Update
You can use the unless
subcommand of /execute
to execute as all zombies that don't have the custom name:
execute
as @e[type=zombie]
unless data entity @s CustomName
run ...
Pictures about "Command Block /execute at all UNnamed mobs of same type"
How do you execute all entities in Minecraft?
The game processes these subcommands in order from front to end, for example, the following commands are different:How do you summon multiple entities with one command?
The "Riding" tag can allow you to summon more than one entity. The main issue is the entities are stuck riding one another. To overcome this, an Item entity separates each entity that should not be riding the previous entity. This Item has an "Age" tag of 6000, which despawns the item the moment it is summoned.What is the command to summon multiple mobs?
Command Block ChainsMinecraft Execute Command [1.19] Tutorial
More answers regarding command Block /execute at all UNnamed mobs of same type
Answer 2
First create a scoreboard objective:
/scoreboard objectives add selectMe dummy
Then add all your Zombies:
/scoreboard players set @e[name=Name1] selectMe 1
/scoreboard players set @e[name=Name2] selectMe 1
/scoreboard players set @e[name=Name3] selectMe 1
Now, you can execute your command:
/execute @e[score_selectMe=0] ~ ~ ~ summon ArmorStand ~ ~ ~
For more info, click here.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Brett Jordan, Anete Lusina, Kevin Malik, Sora Shimazaki