Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/locate

Command

/locate

Finds the nearest structure, biome or point of interest and shows its coordinates.

Syntax

/locate (biome <biome>|poi <poi>|structure <structure>)

Arguments

ArgumentKind of valueWhat to type
<biome>Game id or tagA 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 tagA 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 tagA 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.

Details

Permission level2: operators, worlds with cheats on, command blocks and functions
Works inOperators on multiplayer servers, singleplayer worlds with cheats enabled, and command blocks and functions.
ResultReports "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.
structureFinds 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.
biomeFinds 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.
poiFinds 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.
TagsWith a tag (starting with #) the answer also names which structure, biome or point of interest was found.
Search startThe search starts at the position where the command is run and covers only the dimension it is run in.

Examples

/locate structure minecraft:village_plains

Finds the nearest Plains Village.

/locate structure #minecraft:village

Finds the nearest Village of any kind.

/locate structure minecraft:stronghold

Finds the nearest Stronghold.

/locate biome minecraft:cherry_grove

Finds the nearest Cherry Grove.

/locate biome #minecraft:is_ocean

Finds the nearest ocean biome.

/locate poi minecraft:nether_portal

Finds the nearest Nether Portal within 256 blocks.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)