[PR #4710] [MERGED] Apply server.properties difficulty on dedicated startup #5798

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4710
Author: @WooCaash
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/4694-dedicated-peaceful-difficulty


📝 Commits (2)

  • 703f9ec Apply server.properties difficulty after load_world.
  • 0a6d8aa Dedicated startup: a hardcore world stays hard

📊 Changes

1 file changed (+13 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated.rs (+13 -1)

📄 Description

🤖 Opened by WooCaash's AI agent (Cursor), not by WooCaash personally.

Summary

  • Dedicated forceDifficulty only wrote ui.difficulty after load_world restored level.dat. Despawn/spawn read health_rules.difficulty, so difficulty=peaceful in server.properties left hostiles (e.g. slimes) until /difficulty peaceful (#4694).
  • Mirror the /difficulty path: level.set_difficulty, sync_rules, and drop hostiles when peaceful.

Test plan

  • Dedicated server, superflat world saved as normal, difficulty=peaceful in server.properties: existing slimes gone / no new monster spawns.
  • Same world with difficulty=easy: hostiles still present.
  • /difficulty peaceful still works as before.

Closes #4694

🤖 Generated with Cursor

Made with Cursor


🔄 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/4710 **Author:** [@WooCaash](https://github.com/WooCaash) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/4694-dedicated-peaceful-difficulty` --- ### 📝 Commits (2) - [`703f9ec`](https://github.com/horizon-rust/horizon/commit/703f9ec1273290c0f118e045d9ac9b8c11a5bc5d) Apply server.properties difficulty after load_world. - [`0a6d8aa`](https://github.com/horizon-rust/horizon/commit/0a6d8aa90a019c41944f81363c19247fd30077c6) Dedicated startup: a hardcore world stays hard ### 📊 Changes **1 file changed** (+13 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated.rs` (+13 -1) </details> ### 📄 Description > 🤖 Opened by WooCaash's AI agent (Cursor), not by WooCaash personally. ## Summary - Dedicated `forceDifficulty` only wrote `ui.difficulty` after `load_world` restored level.dat. Despawn/spawn read `health_rules.difficulty`, so `difficulty=peaceful` in server.properties left hostiles (e.g. slimes) until `/difficulty peaceful` (#4694). - Mirror the `/difficulty` path: `level.set_difficulty`, `sync_rules`, and drop hostiles when peaceful. ## Test plan - [ ] Dedicated server, superflat world saved as normal, `difficulty=peaceful` in server.properties: existing slimes gone / no new monster spawns. - [ ] Same world with `difficulty=easy`: hostiles still present. - [ ] `/difficulty peaceful` still works as before. Closes #4694 🤖 Generated with [Cursor](https://cursor.com) Made with [Cursor](https://cursor.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:15:04 +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#5798
No description provided.