[PR #6519] [MERGED] Native mods: no rain or thunder in a mod loot kind's Nether and End #6930

Closed
opened 2026-11-03 06:29:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6519
Author: @ErikKalikas
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: mod-loot-weather


📝 Commits (1)

  • adee3fc Native mods: no rain or thunder in a mod loot kind's Nether and End

📊 Changes

1 file changed (+6 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+6 -3)

📄 Description

🤖 Opened by ErikKalikas's AI agent (Claude Code, Claude Opus 5.5), not by ErikKalikas personally.

What and why

#6396 gave a mod's loot kinds the level's rain and thunder (NativeLootLevel.raining / thundering), documented as Level.isRaining / isThundering, but loot_place_at compared the shared weather levels in every dimension. Vanilla's two methods also need canHaveWeather(), which is false with a ceiling (the Nether) and in the End. So with rain in the Overworld, a block broken in the Nether reported raining: true (found by arismoko in the review of #6396).

Both flags now hold only where the level can have weather: self.dim == Dim::Overworld, the same way natural_spawning.rs reads the Nether's ceiling from Dim. 6 lines.

Fixes #6486

Kind

  • bug: a crash or a breakage

Vanilla reference

Level.isRaining (canHaveWeather() && getRainLevel(1.0f) > 0.2), Level.isThundering (canHaveWeather() && getThunderLevel(1.0f) > 0.9), Level.canHaveWeather (sky light, no ceiling, not the End), read with tools/rea_vanilla.py. Horizon-only API, no parity harness.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on kased-h610mkddr4, against upstream/main at eb0d9e580, 3 min 0 s)

Check Result
Scope ✅ 1 files, +6 −3
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 595 passed (26 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 16 s)
tests: horizon-client ✅ 591 passed (1 min 7 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 293 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, blending, block_particles, boat_authority, boat_paddle_reset, boat_submerged, breaking_model, datafix, datapack_worldgen, decorated_region and 281 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

In the game. The same throwaway data pack and logging condition as in #6396; weather thunder in the Overworld, then a stone broken by the player in each dimension. Same results on the server thread and on a dedicated server (horizon-client --dedicated --nogui, a client joined):

Dimension raining thundering
minecraft:overworld true true
minecraft:the_nether false (true before, as the review saw) false
minecraft:the_end false false

On the server thread, a TNT blast in the Overworld and the Nether reported the same as the player's break there.

🤖 Generated with Claude Code


🔄 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/6519 **Author:** [@ErikKalikas](https://github.com/ErikKalikas) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `mod-loot-weather` --- ### 📝 Commits (1) - [`adee3fc`](https://github.com/horizon-rust/horizon/commit/adee3fcc268c8eedbe0aa61f27e046156faa85ba) Native mods: no rain or thunder in a mod loot kind's Nether and End ### 📊 Changes **1 file changed** (+6 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+6 -3) </details> ### 📄 Description > 🤖 Opened by ErikKalikas's AI agent (Claude Code, Claude Opus 5.5), not by ErikKalikas personally. ## What and why #6396 gave a mod's loot kinds the level's rain and thunder (`NativeLootLevel.raining` / `thundering`), documented as `Level.isRaining` / `isThundering`, but `loot_place_at` compared the shared weather levels in every dimension. Vanilla's two methods also need `canHaveWeather()`, which is false with a ceiling (the Nether) and in the End. So with rain in the Overworld, a block broken in the Nether reported `raining: true` (found by arismoko in the review of #6396). Both flags now hold only where the level can have weather: `self.dim == Dim::Overworld`, the same way `natural_spawning.rs` reads the Nether's ceiling from `Dim`. 6 lines. Fixes #6486 ## Kind - [x] bug: a crash or a breakage ## Vanilla reference `Level.isRaining` (`canHaveWeather() && getRainLevel(1.0f) > 0.2`), `Level.isThundering` (`canHaveWeather() && getThunderLevel(1.0f) > 0.9`), `Level.canHaveWeather` (sky light, no ceiling, not the End), read with `tools/rea_vanilla.py`. Horizon-only API, no parity harness. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on kased-h610mkddr4, against upstream/main at eb0d9e580, 3 min 0 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +6 −3 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 595 passed (26 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 16 s) | | tests: horizon-client | ✅ 591 passed (1 min 7 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 293 affected, to run in CI (--quick): armor_stand_frost, arrow, arrow_wind_charge, blending, block_particles, boat_authority, boat_paddle_reset, boat_submerged, breaking_model, datafix, datapack_worldgen, decorated_region and 281 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | **In the game.** The same throwaway data pack and logging condition as in #6396; `weather thunder` in the Overworld, then a stone broken by the player in each dimension. Same results on the server thread and on a dedicated server (`horizon-client --dedicated --nogui`, a client joined): | Dimension | `raining` | `thundering` | | --- | --- | --- | | `minecraft:overworld` | true | true | | `minecraft:the_nether` | false (true before, as the review saw) | false | | `minecraft:the_end` | false | false | On the server thread, a TNT blast in the Overworld and the Nether reported the same as the player's break there. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:29:24 +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#6930
No description provided.