Skip to content
[/craft]

Herd Mobs into a Holding Pen

Teleport all mobs of a type into one enclosed area

✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026

Teleports every cow currently loaded in the world to 50, 64, 50 — build fences or walls there first so they stay put. Change type=cow to any mob (sheep, villager, zombie) to round them up. This gathers scattered animals into a single pen for breeding or slaughter farms.

/tp @e[type=cow] 50 64 50
25 characters

How to use

  1. Open chat (T on Java, / on Bedrock).
  2. Enclose the destination coordinates with fences or walls first.
  3. Set the type and coordinates, then press Enter to pull all matching mobs into the pen.

Related commands

Jump to a specific mob or entity by its custom name

/tp @s @e[name="Boss",limit=1]

Jump to an entity you marked with a scoreboard tag

/tp @s @e[tag=home,limit=1]

Warp yourself to whichever player is closest

/tp @s @p

Instantly move to a specific X Y Z location

/tp @s 100 64 -200

Instantly move to where another player is standing

/tp @s PlayerName

Set where you respawn after dying to your current location

/spawnpoint @s ~ ~ ~