Minecraft Wiki
Advertisement

Displays the coordinates for the closest generated structure or biomes of a given type in the chat for the player who executed the command. In Java Edition, it can also display for the closest points of interest.

Syntax[]

  • Java Edition
/locate structure <structure>
/locate biome <biome>
/locate poi <poi>
  • Bedrock Edition
/locate structure <structure: Structure> [useNewChunksOnly: Boolean]
/locate biome <biome: Biome>

Arguments[]

JE : <biome>: resource_or_tag
BE: biome: Biome: enum

Specifies the biome to locate. In Java Edition, this argument also supports biome tags.
In Java Edition, must be an existing registered resource location or tag in minecraft:worldgen/biome registry. In Bedrock Edition, must be an ID of a biome (without namespace)

JE (case-sensitive): <structure>: resource_or_tag_key
BE: structure: Structure: enum

Specifies the structure to locate. See Generated structures#Data values.
In Java Edition, must be a resource location or a tag, which will be resolved during command execution into an entry or tag in minecraft:worldgen/structure registry. In Bedrock Edition, must be an ID of a generated structure (without namespace)

BE: useNewChunksOnly: Boolean: enum

Specifies if a structure of any type wants to be located in new chunks only (true) or not (false), and it's false by default.
Must be a boolean (either true or false).

JE : <poi>: resource_or_tag

Specifies the point of interest to locate.
Must be an existing registered resource location or tag in minecraft:point_of_interest_type registry.
The following are resource locations of POIs:
This argument also supports point of interest type tags, as following:

Note[]

For /locate structure ..., the vertical coordinate of structure is ignored when finding. In Java Edition, the horizonal search range is 201×201 chunks[more information needed]. Structures in the Anvil chunk region of the command's execution are prioritized over others due to a bug, meaning the found structure is not necessarily the closest.[1]

For /locate biome ..., the horizonal search resolution is 32 blocks, and vertical resolution is 64 blocks, which means biomes that are too narrow may not be found. The horizonal search range is 12801×12801 blocks in Java Edition.[more information needed]

In Java Edition, for /locate poi ..., the search range is a ball with a radius of 256 blocks.

When locating structure or POI, if successful, the following message is sent to chat: "The nearest <requested thing(s)> is at [<x> ~ <z>] (<distance> blocks away)", in which <distance> is the horizontal distance from the executor.

When locating biome, if successful, the following message is sent to chat: "The nearest <requested biome(s)> is at [<x> <y> <z>] (<distance> blocks away)", in which <distance> is the distance from the executor to the biome.

In Java Edition, the coordinates in these messages can be clicked, which can put the command /tp @s <x> ~ <z> in the chat box. The command can then be executed, and the player is sent to those coordinates.

Result[]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Unparseable
locate structure ...the specified resource location or tag is not a valid structure or structure tag Failed N/A
the requested structure doesn't generate in this dimension Failed
unable to locate the requested structure within a square of 201×201 chunks[needs testing in Bedrock Edition]
locate biome ...unable to locate the requested biome within a square of 12801×12801 blocks[needs testing in Bedrock Edition]
locate poi ...unable to locate the requested poi within a ball with a radius of 256 blocks. N/A
anyOtherwiseSuccessful

Output[]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
anyJava EditionOn fail000
locate structure ...
locate poi ...
On success11horizontal distance
between the executor and the requested structure or POI
locate biome ...On success11distance between the executor and the requested biome
anyBedrock EditionOn fail0N/AN/A
On success1N/AN/A

Examples[]

  • To obtain the coordinates of the nearest woodland mansion: /locate structure mansion
  • To obtain the coordinates of the nearest pillager outpost in new chunks only: /locate structure pillager_outpost true[Bedrock Edition only]
  • To obtain the coordinates of the nearest village of any kind: /locate structure #village[Java Edition only]//locate structure village[Bedrock Edition only]
  • To obtain the coordinates of the nearest desert biome: /locate biome desert
  • To obtain the coordinates of the nearest point of interest used by villagers: /locate poi #village[Java Edition only]

History[]

Java Edition
1.1116w39aAdded /locate.
1.1318w06a/locate now accepts different structure names for all structures previously grouped under Temple: Desert_Pyramid, Igloo, Jungle_Pyramid, and Swamp_Hut.
18w08aAdded a clickable teleport link to the /locate command output.
1.1418w47a/locate now accepts Pillager_Outpost.
18w48a/locate now accepts New_Village.
?/locate no longer accepts New_Village.
1.1620w11aNether fossils can now be located.
20w21aStructure names are now specified as lowercase.
1.18.222w03a/locate now uses a namespace ID parameter instead of hard coded values.
Pre-release 1/locate now support tags, using # prefix to distinguish from normal IDs.
The parameter is now a configured structure rather than a structure type.
1.1922w19a/locatebiome has been merged with /locate.
Added the ability to locate points of interest.
Pocket Edition
1.0.0alpha 0.17.0.1Added /locate.
alpha 0.17.0.2Removed /locate.
alpha 1.0.0.0Re-added /locate. Works only for strongholds.
1.1.0alpha 1.1.0.0/locate can now find other structures.
Bedrock Edition
1.19.10beta 1.19.10.23/locate can now find biomes.
1.19.30beta 1.19.30.20The original command /locate <feature:structure> is no longer used.
beta 1.19.30.21Added new structure names with underscores like ancient_city, bastion_remnant, buried_treasure, end_city, pillager_outpost, and ruined_portal.

References[]

Advertisement