[PR #2180] [MERGED] Wire fire burnout, difficulty and spread radius into the fire tick #4078

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/2180
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/fire-burnout-difficulty-radius


📝 Commits (1)

  • 7abb092 Wire fire burnout, difficulty and spread radius into the fire tick

📊 Changes

5 files changed (+65 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/biome.rs (+6 -0)
📝 crates/horizon-client/src/game.rs (+48 -0)
📝 crates/horizon-client/src/game/chat.rs (+1 -0)
📝 crates/horizon-world/src/level/mod.rs (+8 -0)
📝 crates/horizon-world/src/level/tick.rs (+2 -3)

📄 Description

What and why

Three parts of the fire tick were not wired to the real game state.

  1. Increased burnout. FireBlock.tick reads the INCREASED_FIRE_BURNOUT environment attribute; Horizon always used false. The attribute is now read from the biome definitions (jungle, bamboo jungle, swamp, mangrove swamp, mushroom fields, snowy slopes, jagged peaks and frozen peaks set it) and exposed to the block simulation as LevelAccess::increased_fire_burnout. In those biomes the burn chance rolls use 50 less, and the spread odds are halved.
  2. Difficulty. The spread odds use the difficulty id, but the client never provided it, so the default of Normal (2) was always used. GameLevel now returns the world's real difficulty. The nether portal's piglin roll reads the same value, so it follows the difficulty now too.
  3. Spread radius. can_spread_fire_around always returned true. It now follows the fire_spread_radius_around_player game rule (default 128, -1 means everywhere): fire only ticks when a non-spectator player (the local player or a LAN guest in the level) is closer than the radius to the block.

Vanilla reference

  • FireBlock.tick: getValue(EnvironmentAttributes.INCREASED_FIRE_BURNOUT, pos) gives extra = -50 for checkBurnOut, and odds /= 2 for spreading; level.getDifficulty().getId() * 7 in the odds.
  • ServerLevel.canSpreadFireAround: FIRE_SPREAD_RADIUS_AROUND_PLAYER is -1, or ChunkMap.anyPlayerCloseEnoughTo(pos, radius).
  • ChunkMap.playerIsCloseEnoughTo: not a spectator and player.position().distanceTo(pos) < maxDistance.
  • data/minecraft/worldgen/biome/*.json: attributes with minecraft:gameplay/increased_fire_burnout.

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/2180 **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/fire-burnout-difficulty-radius` --- ### 📝 Commits (1) - [`7abb092`](https://github.com/horizon-rust/horizon/commit/7abb092089d5e2008234673454a50f393e26bbc6) Wire fire burnout, difficulty and spread radius into the fire tick ### 📊 Changes **5 files changed** (+65 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/biome.rs` (+6 -0) 📝 `crates/horizon-client/src/game.rs` (+48 -0) 📝 `crates/horizon-client/src/game/chat.rs` (+1 -0) 📝 `crates/horizon-world/src/level/mod.rs` (+8 -0) 📝 `crates/horizon-world/src/level/tick.rs` (+2 -3) </details> ### 📄 Description ## What and why Three parts of the fire tick were not wired to the real game state. 1. Increased burnout. `FireBlock.tick` reads the `INCREASED_FIRE_BURNOUT` environment attribute; Horizon always used `false`. The attribute is now read from the biome definitions (jungle, bamboo jungle, swamp, mangrove swamp, mushroom fields, snowy slopes, jagged peaks and frozen peaks set it) and exposed to the block simulation as `LevelAccess::increased_fire_burnout`. In those biomes the burn chance rolls use 50 less, and the spread odds are halved. 2. Difficulty. The spread odds use the difficulty id, but the client never provided it, so the default of Normal (2) was always used. `GameLevel` now returns the world's real difficulty. The nether portal's piglin roll reads the same value, so it follows the difficulty now too. 3. Spread radius. `can_spread_fire_around` always returned true. It now follows the `fire_spread_radius_around_player` game rule (default 128, -1 means everywhere): fire only ticks when a non-spectator player (the local player or a LAN guest in the level) is closer than the radius to the block. ## Vanilla reference - `FireBlock.tick`: `getValue(EnvironmentAttributes.INCREASED_FIRE_BURNOUT, pos)` gives `extra = -50` for `checkBurnOut`, and `odds /= 2` for spreading; `level.getDifficulty().getId() * 7` in the odds. - `ServerLevel.canSpreadFireAround`: `FIRE_SPREAD_RADIUS_AROUND_PLAYER` is -1, or `ChunkMap.anyPlayerCloseEnoughTo(pos, radius)`. - `ChunkMap.playerIsCloseEnoughTo`: not a spectator and `player.position().distanceTo(pos) < maxDistance`. - `data/minecraft/worldgen/biome/*.json`: `attributes` with `minecraft:gameplay/increased_fire_burnout`. ## 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#4078
No description provided.