Minecraft Wiki
Advertisement
Minecraft Wiki
locate
Permission level
required

2‌[JE only]
1‌[BE only]

Restrictions

Cheat only‌[BE only]

Displays the coordinates for the closest generated structure of a given type in the chat for the player who executed the command.

Syntax[]

  • Java Edition
/locate <StructureType>
  • Bedrock Edition
/locate <feature: Feature>

Arguments[]

JE: <StructureType>
BE: feature: Feature

Specifies the structure to locate. Must be one of the following:
Feature name Java Edition Bedrock Edition Dimension
Bastion remnant bastion_remnant bastionremnant The Nether
Buried treasure buried_treasure buriedtreasure Overworld
End city endcity endcity The End
Fortress fortress fortress The Nether
Woodland mansion mansion mansion Overworld
Mineshaft mineshaft mineshaft Overworld
Monument monument monument Overworld
Nether fossil nether_fossil The Nether
Ocean ruins ocean_ruin ruins Overworld
Pillager outpost pillager_outpost pillageroutpost Overworld
Ruined portal ruined_portal ruinedportal Overworld, The Nether
Shipwreck shipwreck shipwreck Overworld
Stronghold stronghold stronghold Overworld
Desert pyramid desert_pyramid temple Overworld
Igloo igloo
Jungle pyramid jungle_pyramid
Swamp hut swamp_hut
Village village village Overworld
In Java Edition, the structure type is case-sensitive.

Note[]

The vertical coordinate of the structure is ignored when finding.

in Java Edition, 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]

If successful, in Java Edition, the following message is sent to chat: "The nearest <structure_type> is at [<x> ~ <z>] (<distance> blocks away)", in which <distance> is the horizontal distance between the executor and the structure feature. And the coordinates 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 will be sent to those coordinates.

Result[]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Failed
the requested feature doesn't generate in this dimension Failed
unable to locate the requested feature within a square of 201×201 chunks[needs testing in Bedrock Edition]
On successDisplays the coordinates for the closest structure of the given type in the chat

Output[]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
anyJava EditionOn fail000
On success11horizontal distance between the executor and the structure feature
Bedrock EditionOn fail0N/AN/A
On success1N/AN/A

Examples[]

  • To obtain the coordinates of the nearest woodland mansion: /locate mansion

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.1620w11aNether fossils can now be located.
20w21aStructure names are now specified as lowercase.
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.

References[]

Advertisement