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'sfalse
by default. - Must be a boolean (either
true
orfalse
).
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:
Point of Interest ID Blast Furnace armorer
Bee nest bee_nest
Beehive beehive
Smoker butcher
Cartography Table cartographer
Brewing Stand cleric
Composter farmer
Barrel fisherman
Fletching Table fletcher
Bed home
Cauldron leatherworker
Lectern librarian
Lightning Rod lightning_rod
Lodestone lodestone
Stonecutter mason
Bell meeting
Nether Portal nether_portal
Loom shepherd
Smithing Table toolsmith
Grindstone weaponsmith
- This argument also supports point of interest type tags, as following:
Tag Includes #acquirable_job_site
armorer
butcher
cartographer
cleric
farmer
fisherman
fletcher
leatherworker
librarian
mason
shepherd
toolsmith
weaponsmith
#bee_home
bee_nest
beehive
#village
#acquirable_job_site
home
meeting
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[]
Command | Trigger | Java Edition | Bedrock Edition |
---|---|---|---|
any | the 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 | |
any | Otherwise | Successful |
Output[]
Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
---|---|---|---|---|---|
any | Java Edition | On fail | 0 | 0 | 0 |
locate structure ... | On success | 1 | 1 | horizontal distance between the executor and the requested structure or POI | |
locate biome ... | On success | 1 | 1 | distance between the executor and the requested biome | |
any | Bedrock Edition | On fail | 0 | N/A | N/A |
On success | 1 | N/A | N/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.11 | 16w39a | Added /locate . | |||
1.13 | 18w06a | /locate now accepts different structure names for all structures previously grouped under Temple : Desert_Pyramid , Igloo , Jungle_Pyramid , and Swamp_Hut . | |||
18w08a | Added a clickable teleport link to the /locate command output. | ||||
1.14 | 18w47a | /locate now accepts Pillager_Outpost . | |||
18w48a | /locate now accepts New_Village . | ||||
? | /locate no longer accepts New_Village . | ||||
1.16 | 20w11a | Nether fossils can now be located. | |||
20w21a | Structure names are now specified as lowercase. | ||||
1.18.2 | 22w03a | /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.19 | 22w19a | /locatebiome has been merged with /locate . | |||
Added the ability to locate points of interest. | |||||
Pocket Edition | |||||
1.0.0 | alpha 0.17.0.1 | Added /locate . | |||
alpha 0.17.0.2 | Removed /locate . | ||||
alpha 1.0.0.0 | Re-added /locate . Works only for strongholds. | ||||
1.1.0 | alpha 1.1.0.0 | /locate can now find other structures. | |||
Bedrock Edition | |||||
1.19.10 | beta 1.19.10.23 | /locate can now find biomes. | |||
1.19.30 | beta 1.19.30.20 | The original command /locate <feature:structure> is no longer used. | |||
beta 1.19.30.21 | Added new structure names with underscores like ancient_city , bastion_remnant , buried_treasure , end_city , pillager_outpost , and ruined_portal . |