[GH-ISSUE #6903] F3 overlay and /data get scale format numbers with Rust {:.N} instead of Java %.Nf #2248

Open
opened 2026-11-02 15:53:20 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @ClickingMaster on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6903

🤖 Filed by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally.

Same class as #6890 (fixed by #6899), in places that PR does not touch: numbers formatted with Rust {:.N} where vanilla uses String.format(Locale.ROOT, "%.Nf"). Java rounds the shortest decimal text half-up; Rust rounds the exact binary value, so ties differ.

  • F3 XYZ: %.3f / %.5f / %.3f (DebugEntryPosition): x = 1.0005 shows 1.000 here, 1.001 in vanilla.
  • F3 Facing ... (%.1f / %.1f) (same class), Speed: %.3f blocks/tick (DebugEntryPlayerSpeed), Local Difficulty: %.2f // %.2f (DebugEntryLocalDifficulty).
  • /data get ... <scale> prints the scale with %.2f (EntityDataAccessor.getPrintSuccess and Block/Storage variants): scale 0.125 prints 0.12, vanilla 0.13.

Fix: use the existing java_text::format_fixed. Files: debug_overlay.rs, game/debug_lines.rs, data_cmd.rs.

Originally created by @ClickingMaster on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6903 > 🤖 Filed by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally. Same class as #6890 (fixed by #6899), in places that PR does not touch: numbers formatted with Rust `{:.N}` where vanilla uses `String.format(Locale.ROOT, "%.Nf")`. Java rounds the shortest decimal text half-up; Rust rounds the exact binary value, so ties differ. - F3 `XYZ: %.3f / %.5f / %.3f` (`DebugEntryPosition`): x = 1.0005 shows `1.000` here, `1.001` in vanilla. - F3 `Facing ... (%.1f / %.1f)` (same class), `Speed: %.3f blocks/tick` (`DebugEntryPlayerSpeed`), `Local Difficulty: %.2f // %.2f` (`DebugEntryLocalDifficulty`). - `/data get ... <scale>` prints the scale with `%.2f` (`EntityDataAccessor.getPrintSuccess` and Block/Storage variants): scale 0.125 prints `0.12`, vanilla `0.13`. Fix: use the existing `java_text::format_fixed`. Files: `debug_overlay.rs`, `game/debug_lines.rs`, `data_cmd.rs`.
Author
Owner

@ClickingMaster commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6572303477 --> @ClickingMaster commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Author
Owner

@ClickingMaster commented on GitHub (Nov 2, 2026):

🤖 Agent: unclaiming (Claude Code, Claude Sonnet 5.5). Not being worked on right now; free for anyone to take.

<!-- gh-comment-id:6585750229 --> @ClickingMaster commented on GitHub (Nov 2, 2026): 🤖 Agent: unclaiming (Claude Code, Claude Sonnet 5.5). Not being worked on right now; free for anyone to take.
Author
Owner

@ClickingMaster commented on GitHub (Nov 2, 2026):

🤖 Agent: /unclaim

Not working on this; releasing it so someone else can take it. (Claude Code, Claude Sonnet 5.5, ClickingMaster's AI agent)

<!-- gh-comment-id:6586087689 --> @ClickingMaster commented on GitHub (Nov 2, 2026): 🤖 Agent: /unclaim Not working on this; releasing it so someone else can take it. (Claude Code, Claude Sonnet 5.5, ClickingMaster's AI agent)
Author
Owner

@ClickingMaster commented on GitHub (Nov 2, 2026):

🤖 Agent: /unclaim

<!-- gh-comment-id:6586222105 --> @ClickingMaster commented on GitHub (Nov 2, 2026): 🤖 Agent: /unclaim
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

🤖 Claims: refused, You don't hold this issue. (asked by @ClickingMaster)

<!-- gh-comment-id:6586354204 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): 🤖 Claims: refused, You don't hold this issue. (asked by @ClickingMaster)
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#2248
No description provided.