[PR #2179] [MERGED] Match vanilla difficulty and survival rules for lightning fire #4077

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

📋 Pull Request Information

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

Base: main ← Head: fix/lightning-fire-rules


📝 Commits (1)

  • d8fcebd Match vanilla difficulty and survival rules for lightning fire

📊 Changes

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

View changed files

📝 crates/horizon-client/src/game/lightning.rs (+13 -17)

📄 Description

What and why

Two differences from vanilla in the fires a lightning bolt starts.

  1. Difficulty. Vanilla starts the strike's fires (spawnFire(4)) only on Normal and Hard, but the fire at each re-flash (spawnFire(0)) has no difficulty check. Horizon skipped both below Normal. The difficulty check now applies only to the first strike.
  2. Where fire can be placed. Vanilla places the fire from BaseFireBlock.getState wherever it can survive: a sturdy floor, or a flammable neighbour for normal fire, and soul sand or soul soil (the soul fire base blocks) for soul fire. Horizon required a sturdy full floor for both, so bolts never lit a block with only a flammable neighbour, and soul sand (not a full block) never got soul fire. The bolt now uses the same fire state and survival check as the other fire sources (fire_state_for and can_survive).

Vanilla reference

  • LightningBolt.tick: spawnFire(4) only when the difficulty is Normal or Hard on the first tick; spawnFire(0) on every re-flash.
  • LightningBolt.spawnFire: BaseFireBlock.getState(level, pos), then the block must be air and fire.canSurvive(level, pos).
  • FireBlock.canSurvive: sturdy block below, or isValidFireLocation (any flammable neighbour).
  • SoulFireBlock.canSurvive: the block below is in the soul fire base blocks.

ServerLevel.canSpreadFireAround (the fire_spread_radius_around_player gate in spawnFire) is not part of this change.

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/2179 **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/lightning-fire-rules` --- ### 📝 Commits (1) - [`d8fcebd`](https://github.com/horizon-rust/horizon/commit/d8fcebdf71076f0475ceb1ceb9349c652fa2ddcd) Match vanilla difficulty and survival rules for lightning fire ### 📊 Changes **1 file changed** (+13 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lightning.rs` (+13 -17) </details> ### 📄 Description ## What and why Two differences from vanilla in the fires a lightning bolt starts. 1. Difficulty. Vanilla starts the strike's fires (`spawnFire(4)`) only on Normal and Hard, but the fire at each re-flash (`spawnFire(0)`) has no difficulty check. Horizon skipped both below Normal. The difficulty check now applies only to the first strike. 2. Where fire can be placed. Vanilla places the fire from `BaseFireBlock.getState` wherever it can survive: a sturdy floor, or a flammable neighbour for normal fire, and soul sand or soul soil (the soul fire base blocks) for soul fire. Horizon required a sturdy full floor for both, so bolts never lit a block with only a flammable neighbour, and soul sand (not a full block) never got soul fire. The bolt now uses the same fire state and survival check as the other fire sources (`fire_state_for` and `can_survive`). ## Vanilla reference - `LightningBolt.tick`: `spawnFire(4)` only when the difficulty is Normal or Hard on the first tick; `spawnFire(0)` on every re-flash. - `LightningBolt.spawnFire`: `BaseFireBlock.getState(level, pos)`, then the block must be air and `fire.canSurvive(level, pos)`. - `FireBlock.canSurvive`: sturdy block below, or `isValidFireLocation` (any flammable neighbour). - `SoulFireBlock.canSurvive`: the block below is in the soul fire base blocks. `ServerLevel.canSpreadFireAround` (the `fire_spread_radius_around_player` gate in `spawnFire`) is not part of this change. ## 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:31 +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#4077
No description provided.