Minecraft wiki entry for locate, associated text: 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.