Minecraft:Commands/locate
More actions
Displays the Minecraft:coordinates for the closest generated structure or Minecraft:biomes of a given type in the chat for the player who executed the command. in Template:Editions, it can also display for the closest points of interest.
Usage
For
- REDIRECT Template:Code
Template:Redr, the vertical coordinate of structure is ignored when finding. in Template:Editions, the horizonal search range is 201x201 units of the Structure's spacing (see Default structure sets for values). For example, Mansions have a spacing of 80 chunks, so it can search out ±128,000 blocks before failure. For concentric ring structures like Strongholds, there is no set max distance. 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.<ref>Template:Bug</ref>
For
- REDIRECT Template:Code
Template:Redr, 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 Template:Editions.<more information needed></more information needed>
in Template:Editions, for
- REDIRECT Template:Code
Template:Redr, the search range is a sphere 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 Template:Editions, the coordinates in these messages can be clicked, which can put the command
- REDIRECT Template:Command
Template:Redr in the chat box. The command can then be executed, and the player is sent to those coordinates. Also, in Template:Editions, this message does not appear if the command was run from a function.<ref>Template:Bug</ref>
Syntax
- Java Edition
/locate structure <structure>/locate biome <biome>/locate poi <poi>
- Bedrock Edition
/locate structure <structure: Structure> [useNewChunksOnly: Boolean]/locate biome <minecraft: Biome>
Arguments
- REDIRECT Template:Edition
Template:Rcat : <biome>: resource_or_tag
- REDIRECT Template:Edition
Template:Rcat: biome: Biome: enum
- Specifies the Minecraft:biome to locate. in Template:Editions, this argument also supports biome tags.
- Template:Arg desc
- REDIRECT Template:Edition
Template:Rcat (case-sensitive): <structure>: resource_or_tag_key
- REDIRECT Template:Edition
Template:Rcat: structure: Structure: enum
- Specifies the structure to locate. See Generated structures.
- Template:Arg desc
- REDIRECT Template:Edition
Template:Rcat: useNewChunksOnly: Boolean: enum
- Specifies if a structure of any type wants to be located in new chunks only (
true) or not (false), and it'sfalseby default. - Template:Arg desc
- REDIRECT Template:Edition
Template:Rcat : <poi>: resource_or_tag
- Specifies the point of interest to locate.
- Template:Arg desc
- The following are resource locations of POIs:
Point of Interest ID Blast Furnace - REDIRECT Template:Code
Bee nest - REDIRECT Template:Code
Beehive - REDIRECT Template:Code
Smoker - REDIRECT Template:Code
Cartography Table - REDIRECT Template:Code
Brewing Stand - REDIRECT Template:Code
Composter - REDIRECT Template:Code
Barrel - REDIRECT Template:Code
Fletching Table - REDIRECT Template:Code
Bed - REDIRECT Template:Code
Cauldron - REDIRECT Template:Code
Lectern - REDIRECT Template:Code
Lightning Rod - REDIRECT Template:Code
Lodestone - REDIRECT Template:Code
Stonecutter - REDIRECT Template:Code
Bell - REDIRECT Template:Code
Nether Portal - REDIRECT Template:Code
Loom - REDIRECT Template:Code
Smithing Table - REDIRECT Template:Code
Grindstone - REDIRECT Template:Code
- This argument also supports point of interest type tags, as following:
Tag Includes Template:Tag link - REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
- REDIRECT Template:Code
Template:Tag link - REDIRECT Template:Code
- REDIRECT Template:Code
Template:Tag link - REDIRECT Template:Code
- REDIRECT Template:Code
Result
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Output
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|0}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|horizontal distance
between the executor and the requested structure or POI}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|locate structure ...}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|distance between the executor and the requested biome}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|
locate poi ...locate biome ...}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|Any}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|be}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
Examples
- To obtain the coordinates of the nearest woodland mansion:
- REDIRECT Template:Command
- To obtain the coordinates of the nearest pillager outpost in new chunks only:
- REDIRECT Template:Command
- To obtain the coordinates of the nearest village of any kind:
- REDIRECT Template:Command
- REDIRECT Template:Command
- To obtain the coordinates of the nearest desert biome:
- REDIRECT Template:Command
- To obtain the coordinates of the nearest point of interest used by villagers:
- REDIRECT Template:Command
History
Java Edition
Bedrock Edition
References
<references group="">
</references>
External links
de:Befehl/locate es:Comandos/locate fr:Commandes/locate ja:コマンド/locate ko:명령어/locate pt:Comandos/locate ru:Команды консоли/locate uk:Команди консолі/locate zh:命令/locate