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 2026Teleports 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 5025 characters
- Java: yes
- Bedrock: yes
- Command block: yes
- Needs cheats / OP: yes
How to use
- Open chat (T on Java, / on Bedrock).
- Enclose the destination coordinates with fences or walls first.
- 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]Set where you respawn after dying to your current location
/spawnpoint @s ~ ~ ~