[PR #1840] [CLOSED] Hurt and ignite players inside lava cauldrons #3806

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1840
Author: @kacpherek
Created: 10/25/2026
Status: ❌ Closed

Base: main ← Head: fix/1320-lava-cauldron-damage


📝 Commits (1)

  • 1ab7879 Hurt and ignite players inside lava cauldrons

📊 Changes

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

View changed files

📝 crates/horizon-client/src/motion.rs (+29 -13)

📄 Description

What and why

Fixes #1320.

A player standing in a lava cauldron took no damage. The player's inside-block check (MotionWorld::check_inside_blocks) skipped every filled cauldron, so LavaCauldronBlock.entityInside never ran.

Lava cauldrons now go through that check with their filled shape: the cauldron's own shape plus the lava column, Block.column(12, 4, 15). An entity inside it gets the three effects vanilla applies: CLEAR_FREEZE (ticks frozen to 0), LAVA_IGNITE (Entity.lavaIgnite, 15 seconds of fire scaled by burning_time) and Entity.lavaHurt (4 lava damage). Like cactus and campfire contact, this runs on both the client path and the server path (server_block_damage), so it works with and without the server thread. Fire resistance and creative still protect as usual, through the existing ignite_for_ticks and environment_hurt.

Water and powder snow cauldrons are still skipped; they need the EXTINGUISH callback that lowers the fill level (#1330), which is a separate change.

Vanilla reference

  • LavaCauldronBlock.entityInside, LavaCauldronBlock.getEntityInsideCollisionShape and its static FILLED_SHAPE (Shapes.or(AbstractCauldronBlock.SHAPE, Block.column(12, 4, 15)), read from the bytecode)
  • InsideBlockEffectType (CLEAR_FREEZE is Entity.clearFreeze, LAVA_IGNITE is Entity.lavaIgnite), Entity.lavaIgnite, Entity.lavaHurt

No new harness: there is no vanilla oracle for the player's inside-block effects yet, and building one did not fit this change. I checked it with a throwaway unit check on the client and server paths: a player at cauldron floor height (Y + 0.25) in a lava cauldron goes from 20 to 16 health with 300 fire ticks; standing on top of the cauldron and standing in an empty cauldron do nothing. The same check fails on origin/main (health stays 20). The existing auto_jump harness, which drives the player's motion through this code, passes.

Self-check

pr_ready (tools/pr_ready.py --quick on device-591, against origin/main at e28b45376, 5 min 45 s)

Check Result
Scope ✅ 1 files, +29 −13
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (5 s)
clippy ✅ (39 s)
tests: horizon-client ✅ 1236 passed (4 min 57 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 330 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 318 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🔄 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/1840 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/1320-lava-cauldron-damage` --- ### 📝 Commits (1) - [`1ab7879`](https://github.com/horizon-rust/horizon/commit/1ab78793ec2d1efbc5b638dee7d3621db978fc42) Hurt and ignite players inside lava cauldrons ### 📊 Changes **1 file changed** (+29 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/motion.rs` (+29 -13) </details> ### 📄 Description ## What and why Fixes #1320. A player standing in a lava cauldron took no damage. The player's inside-block check (`MotionWorld::check_inside_blocks`) skipped every filled cauldron, so `LavaCauldronBlock.entityInside` never ran. Lava cauldrons now go through that check with their filled shape: the cauldron's own shape plus the lava column, `Block.column(12, 4, 15)`. An entity inside it gets the three effects vanilla applies: CLEAR_FREEZE (ticks frozen to 0), LAVA_IGNITE (`Entity.lavaIgnite`, 15 seconds of fire scaled by `burning_time`) and `Entity.lavaHurt` (4 lava damage). Like cactus and campfire contact, this runs on both the client path and the server path (`server_block_damage`), so it works with and without the server thread. Fire resistance and creative still protect as usual, through the existing `ignite_for_ticks` and `environment_hurt`. Water and powder snow cauldrons are still skipped; they need the EXTINGUISH callback that lowers the fill level (#1330), which is a separate change. ## Vanilla reference - `LavaCauldronBlock.entityInside`, `LavaCauldronBlock.getEntityInsideCollisionShape` and its static `FILLED_SHAPE` (`Shapes.or(AbstractCauldronBlock.SHAPE, Block.column(12, 4, 15))`, read from the bytecode) - `InsideBlockEffectType` (CLEAR_FREEZE is `Entity.clearFreeze`, LAVA_IGNITE is `Entity.lavaIgnite`), `Entity.lavaIgnite`, `Entity.lavaHurt` No new harness: there is no vanilla oracle for the player's inside-block effects yet, and building one did not fit this change. I checked it with a throwaway unit check on the client and server paths: a player at cauldron floor height (Y + 0.25) in a lava cauldron goes from 20 to 16 health with 300 fire ticks; standing on top of the cauldron and standing in an empty cauldron do nothing. The same check fails on `origin/main` (health stays 20). The existing `auto_jump` harness, which drives the player's motion through this code, passes. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on device-591, against origin/main at e28b45376, 5 min 45 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +29 −13 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (5 s) | | clippy | ✅ (39 s) | | tests: horizon-client | ✅ 1236 passed (4 min 57 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 330 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 318 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | --- <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:27 +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#3806
No description provided.