[PR #3344] [CLOSED] Select world: display Hardcore Mode in red #4915

Closed
opened 2026-11-03 05:08:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3344
Author: @echo-ilovech3ss
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: fix/hardcore-world-display-mode


📝 Commits (1)

  • 4333689 Select world: display Hardcore Mode in red

📊 Changes

3 files changed (+53 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/save.rs (+4 -0)
📝 crates/horizon-client/src/title.rs (+16 -6)
📝 crates/horizon-client/src/title/tests.rs (+33 -0)

📄 Description

What and Why

Fixes #3298.

Hardcore worlds displayed as 'Survival Mode' in gray text in the world selection list because WorldEntry did not retain the hardcore flag and the list renderer always fell back to Survival Mode.

In vanilla Minecraft Java Edition (LevelSummary.java), hardcore worlds take precedence and display the localized gameMode.hardcore text ("Hardcore Mode") styled in red (ChatFormatting.RED), while subsequent details remain in standard gray.

Changes

  • crates/horizon-client/src/title.rs: Added pub hardcore: bool to WorldEntry. Populated it from level.hardcore in list_worlds. In Select rendering, formatted gameMode.hardcore in crate::text::RED via Text::colored and batch.text_styled.
  • crates/horizon-client/src/save.rs: Added dual detection for both root Data.hardcore (legacy/vanilla) and difficulty_settings.hardcore (modern vanilla/Horizon). Also write hardcore to root Data for third-party tool and vanilla interoperability.
  • crates/horizon-client/src/title/tests.rs: Added unit test verifying that hardcore saves in the world list correctly report hardcore: true and creative: false.

Checks

  • cargo test -p horizon-client --lib -- title::tests: all 32 tests pass.
  • python3 tools/check_public_tree.py: passed.
  • Verified against vanilla Minecraft 26.3 LevelSummary bytecode and reviewed by sol-reviewer.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3344 **Author:** [@echo-ilovech3ss](https://github.com/echo-ilovech3ss) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/hardcore-world-display-mode` --- ### 📝 Commits (1) - [`4333689`](https://github.com/horizon-rust/horizon/commit/43336897f550c8debfc43352e3788deea55d3224) Select world: display Hardcore Mode in red ### 📊 Changes **3 files changed** (+53 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/save.rs` (+4 -0) 📝 `crates/horizon-client/src/title.rs` (+16 -6) 📝 `crates/horizon-client/src/title/tests.rs` (+33 -0) </details> ### 📄 Description ### What and Why Fixes #3298. Hardcore worlds displayed as 'Survival Mode' in gray text in the world selection list because `WorldEntry` did not retain the hardcore flag and the list renderer always fell back to Survival Mode. In vanilla Minecraft Java Edition (`LevelSummary.java`), hardcore worlds take precedence and display the localized `gameMode.hardcore` text ("Hardcore Mode") styled in red (`ChatFormatting.RED`), while subsequent details remain in standard gray. ### Changes - `crates/horizon-client/src/title.rs`: Added `pub hardcore: bool` to `WorldEntry`. Populated it from `level.hardcore` in `list_worlds`. In `Select` rendering, formatted `gameMode.hardcore` in `crate::text::RED` via `Text::colored` and `batch.text_styled`. - `crates/horizon-client/src/save.rs`: Added dual detection for both root `Data.hardcore` (legacy/vanilla) and `difficulty_settings.hardcore` (modern vanilla/Horizon). Also write `hardcore` to root `Data` for third-party tool and vanilla interoperability. - `crates/horizon-client/src/title/tests.rs`: Added unit test verifying that hardcore saves in the world list correctly report `hardcore: true` and `creative: false`. ### Checks - `cargo test -p horizon-client --lib -- title::tests`: all 32 tests pass. - `python3 tools/check_public_tree.py`: passed. - Verified against vanilla Minecraft 26.3 `LevelSummary` bytecode and reviewed by sol-reviewer. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:54 +07:00
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#4915
No description provided.