Command Block /execute at all UNnamed mobs of same type

Command Block /execute at all UNnamed mobs of same type - Brown Wooden Blocks on White Surface

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"

Command Block /execute at all UNnamed mobs of same type - Crop hacker silhouette typing on computer keyboard while hacking system
Command Block /execute at all UNnamed mobs of same type - Brown Wooden Door With Silver Door Lever
Command Block /execute at all UNnamed mobs of same type - From above of crop anonymous male hacker typing on netbook with data on screen while sitting at desk



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:
  • All entities move one block forward: execute as @e at @s run tp ^ ^ ^1.
  • All entities are teleported to one block in front of the executor: execute at @s as @e run tp ^ ^ ^1.


  • 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 Chains
  • Place another command block next to the existing block. ...
  • Open the command block interface.
  • Set the Block Type to Chain.
  • Set the Condition to Conditional.
  • Set the Redstone to Always Active.
  • Set the Command Input to /testfor @p[tag=!placed_block]




  • Minecraft 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