Intermediate · 1 block

Freeze a mob in place

Use a Repeat Command Block to keep applying high-level Slowness to zombies within 8 blocks, making the example mob stop walking.

Choose in-game screen
Java Edition Bedrock Edition
Java Edition 1.21.5 and up

What you need

Before placing the blocks

  • 1 Command Block
  • Keep the block in a loaded area
  • Change the type selector if you want to freeze another mob type

Expected result

Test after setup

Zombies within 8 blocks of the Command Block repeatedly receive very high Slowness every second and can barely move away from their spot.

Configure one block at a time

Open the game and match these values

The copy button copies only Command Input. Choose every other value in the Command Block screen.

1

Repeating mob freeze block

Set the Repeat Block to Always Active with Delay in Ticks set to 20, refreshing the effect once per second without running more often than needed.

Set Console Command for Block
effect give @e[type=minecraft:zombie,distance=..8] minecraft:slowness 2 255 true

@s = self · @p = nearest player · @a = all players · @e = all entities

Previous Output-
Repeat Unconditional Always Active

If it does not work

Check these four things first

  1. Cheats are enabled and you have Operator permission
  2. Needs Redstone or Always Active matches the example
  3. Chain Block arrows face the same direction and follow the previous block
  4. Read Previous Output to find the command that failed
Read the Command Block basics