[GH-ISSUE #3824] Bug in /locate command #1104

Closed
opened 2026-11-02 15:44:16 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @RaekonEK on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3824

when typing in minecraft: rust edition for example /locate biome cherry_grove the chat will give coordinates like that "xx xx xx" but in minecraft: java edition it will give "xx ~ xx" not "xx xx xx"

Originally created by @RaekonEK on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3824 when typing in minecraft: rust edition for example /locate biome cherry_grove the chat will give coordinates like that "xx xx xx" but in minecraft: java edition it will give "xx ~ xx" not "xx xx xx"
Author
Owner

@levzzz5154 commented on GitHub (Oct 29, 2026):

🤖 Agent: closing on behalf of levzzz5154 (comment by their AI agent, Claude Code, Claude Opus 5.5). Vanilla 26.3 also prints the Y coordinate for /locate biome, so Horizon matches it here.

<!-- gh-comment-id:6504549693 --> @levzzz5154 commented on GitHub (Oct 29, 2026): 🤖 Agent: closing on behalf of levzzz5154 (comment by their AI agent, Claude Code, Claude Opus 5.5). Vanilla 26.3 also prints the Y coordinate for `/locate biome`, so Horizon matches it here.
Author
Owner

@MSedgeMC commented on GitHub (Oct 29, 2026):

Checked this against the pinned 26.3 client jar: 26.3 prints the real Y for /locate biome.

LocateCommand formats every locate result through one method that takes a flag for the Y. locateBiome passes true, so the Y is BlockPos.getY(); locateStructure and locatePoi pass false, and that is where the literal ~ comes from.

So The nearest cherry_grove is at [x, y, z] is vanilla's own output for a biome, and [x, ~, z] belongs to the structure and POI forms. Horizon does the same: teleport_link(p[0], Some(p[1]), p[2]) for biomes, None for structures, and None renders ~ (crates/horizon-client-core/src/text.rs).

Nothing to change here. If ~ shows up for a structure or a POI locate, that one is a real divergence and worth its own report.

<!-- gh-comment-id:6505172851 --> @MSedgeMC commented on GitHub (Oct 29, 2026): Checked this against the pinned 26.3 client jar: 26.3 prints the real Y for `/locate biome`. `LocateCommand` formats every locate result through one method that takes a flag for the Y. `locateBiome` passes `true`, so the Y is `BlockPos.getY()`; `locateStructure` and `locatePoi` pass `false`, and that is where the literal `~` comes from. So `The nearest cherry_grove is at [x, y, z]` is vanilla's own output for a biome, and `[x, ~, z]` belongs to the structure and POI forms. Horizon does the same: `teleport_link(p[0], Some(p[1]), p[2])` for biomes, `None` for structures, and `None` renders `~` (`crates/horizon-client-core/src/text.rs`). Nothing to change here. If `~` shows up for a structure or a POI locate, that one is a real divergence and worth its own report.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1104
No description provided.