Commands
How to Use the /locate Command
Stop wandering. /locate structure minecraft:village tells the server to find the closest matching structure and hand you its X and Z coordinates plus the distance, one line, no guesswork. Here is the exact syntax, how to read the result, and how to teleport there.
server console, overworld
[12:04:18] [Server thread/INFO]: Preparing locate query…
$ /locate structure minecraft:village
The nearest minecraft:village is at
[ -312, ~, 488 ]
( 1041 blocks away )
[12:04:21] [Server thread/INFO]: tip, paste the coords into /tp @s -312 ~ 488
Reading the coordinate output
A successful run prints a single result line shaped like The nearest minecraft:village is at [-312, ~, 488] (1041 blocks away). The first number is X, the tilde is Y (left relative on purpose), and the last number is Z.
The distance in parentheses is straight-line, measured from your current position, handy for deciding whether to walk or teleport. Click the coordinates in chat to copy them, then drop them into /tp @s -312 ~ 488 to jump straight to the spot.
Quick answers
+What is the exact syntax for /locate?
In 1.19+ it is /locate structure <id>for example /locate structure minecraft:village. Older versions used /locate village with no structure keyword.
+Why does the Y coordinate show a tilde?
The tilde (~) means current Y. /locate only resolves horizontal X and Z, so it leaves Y as relative, you climb or dig to the actual surface.
+What can I locate besides villages?
Any structure ID: minecraft:fortress, minecraft:stronghold, minecraft:ancient_city, minecraft:mansion, plus /locate biome and /locate poi for biomes and points of interest.
+Why do I get No structure found nearby?
The structure does not generate within the search radius (often thousands of blocks), or it is disabled in your world settings. Travel further and try again.
+Do I need cheats or op to use it?
Yes. /locate requires permission level 2. Enable cheats in single-player, or have an operator run it on a multiplayer server.
+How do I teleport to the located structure?
Take the X and Z from the result and run /tp @s X ~ Z. The ~ keeps your current height so you arrive on the surface near the structure.
/locate at a glance
Syntax
/locate <structure|biome|poi> <id>What it does
Finds the nearest specified structure, biome, or point of interest and displays its coordinates.
Three things /locate is actually used for
/locate structure minecraft:village_plainsPrints the coordinates of the nearest plains village and the distance to it.
/locate biome minecraft:mushroom_fieldsFinds the nearest mushroom fields, one of the biomes that can generate thousands of blocks away.
/locate structure minecraft:trial_chambersPoints at the nearest trial chamber, which saves a lot of digging at deepslate level.
/locate sits with the world commands in Minecraft, 9 of them in total. The ones with a guide here: /clone, /fill, /setblock, /summon.
Every command with its full argument list lives in the command reference.
Guides that go with this one
How to Keep Your Inventory on Death in Minecraft
Stop losing items when you die. Set /gamerule keepInventory true so your inventory and XP survive death,...
Best Minecraft Horse Breeds and Variants
Everything you need to know about Minecraft horse colors, markings, stats, and breeding, plus how to...
How to Find a Woodland Mansion in Minecraft
Woodland mansions are huge dark-oak buildings full of illagers and loot. Here is how to locate one with...
How to Use the /setblock Command in Minecraft
Place any block at exact coordinates with /setblock. Learn relative ~ and absolute syntax, block states,...
How to Use the /summon Command in Minecraft
Spawn any mob with /summon, set exact coordinates with ~ ~ ~, and customize it using NBT tags like...
How to Use the Teleport Command in Minecraft
Use /tp and /teleport to move players to another player, to exact coordinates, or with relative ~ ~ ~...