Updated:
Summon a mob that does not move (Java)
/summon minecraft:zombie ~ ~ ~ {NoAI:1b}
With NoAI:1b the mob does not walk, chase or attack, and keeps facing the same way, so it works like a statue.
Tags that go well with it
| Tag | Effect |
|---|---|
NoAI:1b | No movement or attacks |
PersistenceRequired:1b | Does not despawn |
Silent:1b | Makes no sounds |
Invulnerable:1b | Takes no damage |
/summon minecraft:villager ~ ~ ~ {NoAI:1b,PersistenceRequired:1b,Silent:1b,Invulnerable:1b}
This villager stays put, never despawns, stays quiet and cannot be killed. NoAI villagers can still trade, which makes them good shopkeepers. See the villager shop guide for custom trades.
Freeze a mob that is already there (Java)
/data merge entity @e[type=minecraft:villager,limit=1,sort=nearest] {NoAI:1b}
This freezes the nearest villager. Without limit=1,sort=nearest, every matching villager stops. See the data command guide.
Undo it
/data merge entity @e[type=minecraft:villager,limit=1,sort=nearest] {NoAI:0b}
Bedrock Edition
Bedrock commands have no NoAI. A very strong Slowness effect stops most walking:
/effect @e[type=villager,r=5] slowness 99999 255 true
The mob can still turn and attack, so it is not a full statue. For displays, an armor stand with equipment is another option.
When it does not work
- NoAI has no effect: it is Java syntax and does not work on Bedrock.
- The mob disappears: add
PersistenceRequired:1b. - Other mobs froze too: add
limit=1,sort=nearestto the selector.
Common questions
- How do I move a NoAI mob? Teleport it:
/tp @e[type=minecraft:villager,limit=1,sort=nearest] ~ ~ ~. - Can I name it? Yes, combine it with
CustomName. See the summon guide.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.