
Command
/locate
Finds the nearest structure, biome or point of interest and shows its coordinates.
| /locate (biome <biome>|poi <poi>|structure <structure>) |
| Argument | Kind of value | What to type |
|---|---|---|
| <biome> | Game id or tag | A biome id such as minecraft:cherry_grove, or a biome tag starting with # such as #minecraft:is_ocean. The id of a biome, or a #tag of them. |
| <poi> | Game id or tag | A point of interest type such as minecraft:nether_portal, or a tag starting with # such as #minecraft:village. The id of a point of interest, or a #tag of them. |
| <structure> | Game id or tag | A structure id such as minecraft:stronghold, or a structure tag starting with # such as #minecraft:village. The id of a structure, or a #tag of them. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Operators on multiplayer servers, singleplayer worlds with cheats enabled, and command blocks and functions. |
| Result | Reports "The nearest <name> is at <coordinates> (<number> blocks away)". Clicking the coordinates puts a teleport command into the chat box. The number /execute store saves is the distance in blocks. |
| structure | Finds the nearest structure with the given id or in the given structure tag. The Y coordinate is shown as ~ and the distance is measured horizontally. Fails with "Could not find a structure of type ... nearby" if none is close enough, and with "There is no structure with type ..." if the id does not exist. |
| biome | Finds the nearest place with the given biome or biome tag within 6400 blocks. The result includes the Y coordinate, and the distance is measured in all three directions. The search checks a point every 32 blocks horizontally and every 64 blocks vertically, so very small patches can be missed. |
| poi | Finds the nearest point of interest of the given type within 256 blocks, such as a Bee Nest, a Nether Portal or a villager workstation. The Y coordinate is shown as ~ and the distance is measured horizontally. |
| Tags | With a tag (starting with #) the answer also names which structure, biome or point of interest was found. |
| Search start | The search starts at the position where the command is run and covers only the dimension it is run in. |
/locate structure minecraft:village_plainsFinds the nearest Plains Village.
/locate structure #minecraft:villageFinds the nearest Village of any kind.
/locate structure minecraft:strongholdFinds the nearest Stronghold.
/locate biome minecraft:cherry_groveFinds the nearest Cherry Grove.
/locate biome #minecraft:is_oceanFinds the nearest ocean biome.
/locate poi minecraft:nether_portalFinds the nearest Nether Portal within 256 blocks.






