[PR #2182] [MERGED] /weather works with the weather cycle turned off #4082

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2182
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/weather-command-without-cycle


📝 Commits (1)

  • 71981a9 Weather: the rain and thunder fade runs even with the weather cycle off

📊 Changes

2 files changed (+9 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+2 -1)
📝 crates/horizon-client/src/world.rs (+7 -1)

📄 Description

What and why

With the weather cycle turned off (/gamerule advance_weather false), /weather rain and /weather thunder changed nothing you could see. The command sets the flags, but the rain and thunder level, which is what the sky and the rain use, only fades in inside the weather tick, and that tick did not run at all with the rule off. The level stayed at 0.

Vanilla only stops the timers when the rule is off. The fade of the level always runs. This splits the weather tick into the timers (still run only with advance_weather on) and the level fade (always runs), so /weather works with the cycle off and the weather then stays as set.

Vanilla reference

  • ServerLevel.advanceWeatherCycle: the clear/rain/thunder timers are inside if (getGameRules().get(GameRules.ADVANCE_WEATHER))
  • The same method, after that block and outside it: thunderLevel and rainLevel move by 0.01 towards 1 or 0 depending on whether it is thundering or raining, clamped to 0..1

Self-check

cargo check -p horizon-client passes.


🔄 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/2182 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/weather-command-without-cycle` --- ### 📝 Commits (1) - [`71981a9`](https://github.com/horizon-rust/horizon/commit/71981a95a28738df145e1affadc60d069f906436) Weather: the rain and thunder fade runs even with the weather cycle off ### 📊 Changes **2 files changed** (+9 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+2 -1) 📝 `crates/horizon-client/src/world.rs` (+7 -1) </details> ### 📄 Description ## What and why With the weather cycle turned off (`/gamerule advance_weather false`), `/weather rain` and `/weather thunder` changed nothing you could see. The command sets the flags, but the rain and thunder level, which is what the sky and the rain use, only fades in inside the weather tick, and that tick did not run at all with the rule off. The level stayed at 0. Vanilla only stops the timers when the rule is off. The fade of the level always runs. This splits the weather tick into the timers (still run only with `advance_weather` on) and the level fade (always runs), so `/weather` works with the cycle off and the weather then stays as set. ## Vanilla reference - `ServerLevel.advanceWeatherCycle`: the clear/rain/thunder timers are inside `if (getGameRules().get(GameRules.ADVANCE_WEATHER))` - The same method, after that block and outside it: `thunderLevel` and `rainLevel` move by 0.01 towards 1 or 0 depending on whether it is thundering or raining, clamped to 0..1 ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:33 +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#4082
No description provided.