[PR #1918] [MERGED] Water cauldrons put out a burning player and lose a level #3864

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

📋 Pull Request Information

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

Base: main ← Head: fix/water-cauldron-extinguish


📝 Commits (3)

  • 72de6e0 Water cauldrons put out a burning player and lose a level
  • 1587793 Merge origin/main into fix/water-cauldron-extinguish
  • 2a576b5 Merge origin/main into fix/water-cauldron-extinguish

📊 Changes

4 files changed (+174 additions, -17 deletions)

View changed files

📝 crates/horizon-client/src/cauldron.rs (+34 -0)
📝 crates/horizon-client/src/game.rs (+30 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+6 -0)
📝 crates/horizon-client/src/motion.rs (+104 -17)

📄 Description

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

What and why

Fixes #1330. Builds on #1834 (the lava cauldron's inside-shape test): this branch has #1834's commit under its
own, so until #1834 lands the diff shows both; only the top commit is new.

A burning player stepping into a water cauldron kept burning, and the water stayed at level 3. The player's
inside-block sweep skipped water and powder snow cauldrons, like lava ones before #1834.

  • motion.rs: water and powder snow cauldrons now go through the same shape test as the lava one, against the
    cauldron's shape or its content, Block.column(12, 4, top) with top the lava's 15/16 or a layered cauldron's
    getPixelContentHeight (6 + 3 per level, in sixteenths). Inside one, layered_cauldron_inside does
    LayeredCauldronBlock.entityInside: a burning player first asks for handleEntityOnFireInside (it's
    runBefore(EXTINGUISH, …), so the check sees the fire still lit), then EXTINGUISH (Entity.clearFire:
    setRemainingFireTicks(min(0, ticks))) puts it out. It sits with cactus, campfires and the lava cauldron, so it
    runs for the game's own player and for a server's (server_block_damage).
  • cauldron.rs: extinguished, the handleEntityOnFireInside state change: a water cauldron loses a level (level
    1 empties it), a powder snow cauldron turns to a water cauldron of its level first, then loses one. It reuses the
    file's lowered (lowerFillLevel).
  • game.rs / game/lan_actions.rs: the new MotionEvent::CauldronExtinguish sets that state with
    block_change and no source, for the game's own player and for a server's (as that guest); a client of a server
    leaves it to the server.

Vanilla reference

  • LayeredCauldronBlock.entityInside: on a ServerLevel, runBefore(EXTINGUISH, e -> if (e.isOnFire() && e.mayInteract(level, pos)) handleEntityOnFireInside(state, level, pos)), then apply(EXTINGUISH)
  • LayeredCauldronBlock.handleEntityOnFireInside: SNOW precipitation (powder snow) →
    lowerFillLevel(WATER_CAULDRON with this LEVEL), otherwise lowerFillLevel(state)
  • LayeredCauldronBlock.lowerFillLevel: level 1 → CAULDRON, else level − 1; setBlockAndUpdate, BLOCK_CHANGE
    with GameEvent.Context.of(newState)
  • LayeredCauldronBlock.getEntityInsideCollisionShape → FILLED_SHAPES[level − 1] = Shapes.or(SHAPE, Block.column(12, 4, getPixelContentHeight(level))), getPixelContentHeight(l) = 6 + 3 * l
  • InsideBlockEffectType.EXTINGUISH → Entity.clearFire

Checked against the 26.3 client jar's bytecode (javap).

New tests: cauldron::tests::a_burning_entity_lowers_water_and_melts_powder_snow (the state changes) and
motion::tests::a_water_cauldron_puts_out_a_burning_player (a burning player on a level-3 water cauldron's floor is
put out and asks once for the lowering; a dry one doesn't). With the launcher's prepared v0.2.55 resources both pass,
and #1834's a_lava_cauldron_burns_the_player_inside_it still does.

Self-check

pr_ready (tools/pr_ready.py on debian, against origin/main at 6c4d1d6cb, 4 min 15 s)

Check Result
Scope ✅ 4 files, +243 −21
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (16 s)
clippy ✅ (1 min 1 s)
tests: horizon-client ❌ 1100 passed, 2 failed (2 min 54 s)
doc tests ✅ 0 passed (4 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Scope includes #1834's commit (this branch is on it). The two failing tests, packs::cache::tests::zip_content_and_failed_build_invalidate and packs::cache::tests::normalized_and_external_overlay_roots_keep_merged_bytes_current, fail the same way on main on this machine and come and go between runs here; CI's verify passes them.

Not checked in game.

🤖 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/1918 **Author:** [@vlesmentie](https://github.com/vlesmentie) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/water-cauldron-extinguish` --- ### 📝 Commits (3) - [`72de6e0`](https://github.com/horizon-rust/horizon/commit/72de6e0b70aece450db738b421222b4ec9b6bd78) Water cauldrons put out a burning player and lose a level - [`1587793`](https://github.com/horizon-rust/horizon/commit/15877931dbea28dd66cd31d57aced0991728b060) Merge origin/main into fix/water-cauldron-extinguish - [`2a576b5`](https://github.com/horizon-rust/horizon/commit/2a576b588662c7ffdef9e6f1108d47ede1f1bc73) Merge origin/main into fix/water-cauldron-extinguish ### 📊 Changes **4 files changed** (+174 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/cauldron.rs` (+34 -0) 📝 `crates/horizon-client/src/game.rs` (+30 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+6 -0) 📝 `crates/horizon-client/src/motion.rs` (+104 -17) </details> ### 📄 Description > 🤖 Opened by vlesmentie's AI agent (Claude Code, Claude Opus 5.5), not by vlesmentie themselves. ## What and why Fixes #1330. **Builds on #1834** (the lava cauldron's inside-shape test): this branch has #1834's commit under its own, so until #1834 lands the diff shows both; only the top commit is new. A burning player stepping into a water cauldron kept burning, and the water stayed at level 3. The player's inside-block sweep skipped water and powder snow cauldrons, like lava ones before #1834. - `motion.rs`: water and powder snow cauldrons now go through the same shape test as the lava one, against the cauldron's shape or its content, `Block.column(12, 4, top)` with `top` the lava's 15/16 or a layered cauldron's `getPixelContentHeight` (6 + 3 per level, in sixteenths). Inside one, `layered_cauldron_inside` does `LayeredCauldronBlock.entityInside`: a burning player first asks for `handleEntityOnFireInside` (it's `runBefore(EXTINGUISH, …)`, so the check sees the fire still lit), then EXTINGUISH (`Entity.clearFire`: `setRemainingFireTicks(min(0, ticks))`) puts it out. It sits with cactus, campfires and the lava cauldron, so it runs for the game's own player and for a server's (`server_block_damage`). - `cauldron.rs`: `extinguished`, the `handleEntityOnFireInside` state change: a water cauldron loses a level (level 1 empties it), a powder snow cauldron turns to a water cauldron of its level first, then loses one. It reuses the file's `lowered` (`lowerFillLevel`). - `game.rs` / `game/lan_actions.rs`: the new `MotionEvent::CauldronExtinguish` sets that state with `block_change` and no source, for the game's own player and for a server's (as that guest); a client of a server leaves it to the server. ## Vanilla reference - `LayeredCauldronBlock.entityInside`: on a `ServerLevel`, `runBefore(EXTINGUISH, e -> if (e.isOnFire() && e.mayInteract(level, pos)) handleEntityOnFireInside(state, level, pos))`, then `apply(EXTINGUISH)` - `LayeredCauldronBlock.handleEntityOnFireInside`: SNOW precipitation (powder snow) → `lowerFillLevel(WATER_CAULDRON with this LEVEL)`, otherwise `lowerFillLevel(state)` - `LayeredCauldronBlock.lowerFillLevel`: level 1 → `CAULDRON`, else level − 1; `setBlockAndUpdate`, `BLOCK_CHANGE` with `GameEvent.Context.of(newState)` - `LayeredCauldronBlock.getEntityInsideCollisionShape` → `FILLED_SHAPES[level − 1] = Shapes.or(SHAPE, Block.column(12, 4, getPixelContentHeight(level)))`, `getPixelContentHeight(l) = 6 + 3 * l` - `InsideBlockEffectType.EXTINGUISH` → `Entity.clearFire` Checked against the 26.3 client jar's bytecode (`javap`). New tests: `cauldron::tests::a_burning_entity_lowers_water_and_melts_powder_snow` (the state changes) and `motion::tests::a_water_cauldron_puts_out_a_burning_player` (a burning player on a level-3 water cauldron's floor is put out and asks once for the lowering; a dry one doesn't). With the launcher's prepared v0.2.55 resources both pass, and #1834's `a_lava_cauldron_burns_the_player_inside_it` still does. ## Self-check **pr_ready** (`tools/pr_ready.py` on debian, against origin/main at 6c4d1d6cb, 4 min 15 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +243 −21 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (16 s) | | clippy | ✅ (1 min 1 s) | | tests: horizon-client | ❌ 1100 passed, 2 failed (2 min 54 s) | | doc tests | ✅ 0 passed (4 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Scope includes #1834's commit (this branch is on it). The two failing tests, `packs::cache::tests::zip_content_and_failed_build_invalidate` and `packs::cache::tests::normalized_and_external_overlay_roots_keep_merged_bytes_current`, fail the same way on `main` on this machine and come and go between runs here; CI's `verify` passes them. Not checked in game. 🤖 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 04:12:51 +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#3864
No description provided.