Minecraft:Commands/locate: Difference between revisions
More actions
imported>Ririplasma28 No edit summary |
Remove broken links to missing pages |
||
| Line 4: | Line 4: | ||
* 2 {{only|java|short=1}} | * 2 {{only|java|short=1}} | ||
* 1 {{only|bedrock|short=1}} | * 1 {{only|bedrock|short=1}} | ||
|others= | |others=Cheat only{{only|bedrock|short=1}} | ||
}} | }} | ||
Displays the [[Minecraft:coordinates]] for the closest | Displays the [[Minecraft:coordinates]] for the closest generated structure or [[Minecraft:biome]]s of a given type in the chat for the player who executed the command. {{IN|java}}, it can also display for the closest points of interest. | ||
==Usage== | ==Usage== | ||
For {{cd|/locate structure ...}}, the vertical coordinate of structure is ignored when finding. {{IN|java}}, the horizonal search range is 201x201 units of the Structure's spacing (see | For {{cd|/locate structure ...}}, the vertical coordinate of structure is ignored when finding. {{IN|java}}, 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>{{bug|MC-138887}}</ref> | ||
For {{cd|/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}}.{{Info needed|How about Bedrock Edition?}} | For {{cd|/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}}.{{Info needed|How about Bedrock Edition?}} | ||
| Line 34: | Line 34: | ||
{{el|je|short=1}} : {{argument|biome|resource_or_tag}}<br> | {{el|je|short=1}} : {{argument|biome|resource_or_tag}}<br> | ||
{{el|be|short=1}}: {{argument|be=1|biome: Biome|enum}} | {{el|be|short=1}}: {{argument|be=1|biome: Biome|enum}} | ||
: Specifies the [[Minecraft:biome]] to locate. {{IN|je}}, this argument also supports biome | : Specifies the [[Minecraft:biome]] to locate. {{IN|je}}, this argument also supports biome tags. | ||
:{{arg_desc|je=resource_or_tag|registry=minecraft:worldgen/biome|be=enum}} | :{{arg_desc|je=resource_or_tag|registry=minecraft:worldgen/biome|be=enum}} | ||
{{el|je|short=1}} (case-sensitive): {{argument|structure|resource_or_tag_key}}<br> | {{el|je|short=1}} (case-sensitive): {{argument|structure|resource_or_tag_key}}<br> | ||
{{el|be|short=1}}: {{argument|be=1|structure: Structure|enum}} | {{el|be|short=1}}: {{argument|be=1|structure: Structure|enum}} | ||
:Specifies the structure to locate. See | :Specifies the structure to locate. See Generated structures. | ||
:{{arg_desc|je=resource_or_tag_key|registry=minecraft:worldgen/structure|be=enum}} | :{{arg_desc|je=resource_or_tag_key|registry=minecraft:worldgen/structure|be=enum}} | ||
| Line 187: | Line 187: | ||
|{{HistoryLine|||dev=18w48a|{{cmd|locate|link=none}} now accepts <code>New_Village</code>.}} | |{{HistoryLine|||dev=18w48a|{{cmd|locate|link=none}} now accepts <code>New_Village</code>.}} | ||
|{{HistoryLine|||dev=?|{{cmd|locate|link=none}} no longer accepts <code>New_Village</code>.}} | |{{HistoryLine|||dev=?|{{cmd|locate|link=none}} no longer accepts <code>New_Village</code>.}} | ||
|{{HistoryLine||1.16|dev=20w11a| | |{{HistoryLine||1.16|dev=20w11a|Nether fossils can now be located.}} | ||
|{{HistoryLine|||dev=20w21a|Structure names are now specified as lowercase.}} | |{{HistoryLine|||dev=20w21a|Structure names are now specified as lowercase.}} | ||
|{{HistoryLine||1.18.2|dev=22w03a|{{cmd|locate|link=none}} now uses a namespace ID parameter instead of hard coded values.}} | |{{HistoryLine||1.18.2|dev=22w03a|{{cmd|locate|link=none}} now uses a namespace ID parameter instead of hard coded values.}} | ||
|{{HistoryLine|||dev=Pre-release 1|{{cmd|locate|link=none}} now support | |{{HistoryLine|||dev=Pre-release 1|{{cmd|locate|link=none}} now support tags, using {{cd|#}} prefix to distinguish from normal IDs. | ||
|The parameter is now a configured structure rather than a structure type.}} | |The parameter is now a configured structure rather than a structure type.}} | ||
|{{HistoryLine||1.19|dev=22w19a|{{cmd|locatebiome}} has been merged with {{cmd|locate|link=none}}.|Added the ability to locate points of interest.}} | |{{HistoryLine||1.19|dev=22w19a|{{cmd|locatebiome}} has been merged with {{cmd|locate|link=none}}.|Added the ability to locate points of interest.}} | ||
| Line 220: | Line 220: | ||
{{Navbox commands}} | {{Navbox commands}} | ||
de:Befehl/locate | |||
es:Comandos/locate | |||
fr:Commandes/locate | |||
ja:コマンド/locate | |||
ko:명령어/locate | |||
pt:Comandos/locate | |||
ru:Команды консоли/locate | |||
uk:Команди консолі/locate | |||
zh:命令/locate | |||
Revision as of 15:44, 9 April 2026
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. Template:IN, it can also display for the closest points of interest.
Usage
For Template:Cd, the vertical coordinate of structure is ignored when finding. Template:IN, 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 Template:Cd, 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 Template:In.Template:Info needed
Template:IN, for Template:Cd, 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.
Template:IN, the coordinates in these messages can be clicked, which can put the command Template:Cmd in the chat box. The command can then be executed, and the player is sent to those coordinates. Also, Template:In, 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
Template:El : Template:Argument
Template:El: Template:Argument
- Specifies the Minecraft:biome to locate. Template:IN, this argument also supports biome tags.
- Template:Arg desc
Template:El (case-sensitive): Template:Argument
Template:El: Template:Argument
- Specifies the structure to locate. See Generated structures.
- Template:Arg desc
Template:El: Template:Argument
- 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
Template:El : Template:Argument
- Specifies the point of interest to locate.
- Template:Arg desc
- The following are resource locations of POIs:
Point of Interest ID Blast Furnace Template:Cd Bee nest Template:Cd Beehive Template:Cd Smoker Template:Cd Cartography Table Template:Cd Brewing Stand Template:Cd Composter Template:Cd Barrel Template:Cd Fletching Table Template:Cd Bed Template:Cd Cauldron Template:Cd Lectern Template:Cd Lightning Rod Template:Cd Lodestone Template:Cd Stonecutter Template:Cd Bell Template:Cd Nether Portal Template:Cd Loom Template:Cd Smithing Table Template:Cd Grindstone Template:Cd
- 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
Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table
Examples
- To obtain the coordinates of the nearest woodland mansion: Template:Cmd
- To obtain the coordinates of the nearest pillager outpost in new chunks only: Template:CmdTemplate:Only
- To obtain the coordinates of the nearest village of any kind: Template:CmdTemplate:Only/Template:CmdTemplate:Only
- To obtain the coordinates of the nearest desert biome: Template:Cmd
- To obtain the coordinates of the nearest point of interest used by villagers: Template:CmdTemplate:Only
History
Java Edition
Bedrock Edition
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