Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/locate

From SAS Gaming Wiki
Revision as of 20:11, 9 April 2026 by SyncBot (talk | contribs) (Fix template calls: add MC/ prefix)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Infobox command

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

  1. 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

  1. 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

  1. 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

  1. 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

  1. REDIRECT Template:Edition

Template:Rcat : <biome>: resource_or_tag

  1. 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
  1. REDIRECT Template:Edition

Template:Rcat (case-sensitive): <structure>: resource_or_tag_key

  1. REDIRECT Template:Edition

Template:Rcat: structure: Structure: enum

Specifies the structure to locate. See Generated structures.
Template:Arg desc
  1. 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's false by default.
Template:Arg desc
  1. 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:
This argument also supports point of interest type tags, as following:

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 ...
locate poi ...
}}{{#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 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:
  1. REDIRECT Template:Command

Template:Redr

  • To obtain the coordinates of the nearest pillager outpost in new chunks only:
  1. REDIRECT Template:Command

Template:RedrTemplate:Only

  • To obtain the coordinates of the nearest village of any kind:
  1. REDIRECT Template:Command

Template:RedrTemplate:Only/

  1. REDIRECT Template:Command

Template:RedrTemplate:Only

  • To obtain the coordinates of the nearest desert biome:
  1. REDIRECT Template:Command

Template:Redr

  • To obtain the coordinates of the nearest point of interest used by villagers:
  1. REDIRECT Template:Command

Template:RedrTemplate:Only

History

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

References

<references group="">

 </references>

External links

Navigation

All editions
Removed
Template:El only
Debug
Removed
Template:Els only
Template:El only
Removed
Template:El only
Removed
Template:Els only
Removed
Joke
Related

de:Befehl/locate es:Comandos/locate fr:Commandes/locate ja:コマンド/locate ko:명령어/locate pt:Comandos/locate ru:Команды консоли/locate uk:Команди консолі/locate zh:命令/locate