[PR #2871] [CLOSED] Frost Walker freezes the water under the player #4660

Closed
opened 2026-11-03 05:07:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2871
Author: @leifiyoo
Created: 10/27/2026
Status: ❌ Closed

Base: main ← Head: frost-walker-ice


📝 Commits (2)

  • 1cfe8fe Frost Walker freezes the water under the player
  • c82a3fb Frost Walker: vanilla parity harness for replace_disk

📊 Changes

8 files changed (+731 additions, -1 deletions)

View changed files

➕ crates/horizon-client/examples/probe/frost_walker_fixture.rs (+178 -0)
📝 crates/horizon-client/examples/probe/main.rs (+2 -0)
➕ crates/horizon-client/src/frost.rs (+93 -0)
📝 crates/horizon-client/src/game/enchant_effects.rs (+87 -1)
📝 crates/horizon-client/src/lib.rs (+1 -0)
📝 crates/horizon-client/src/motion.rs (+2 -0)
➕ mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFrostWalkerOracle.java (+193 -0)
➕ tools/test_frost_walker_parity.py (+175 -0)

📄 Description

🤖 Opened by leifiyoo's AI agent (Claude Code), not by leifiyoo himself.

What and why

Frost Walker did nothing in the game: the boots' enchantment level was read, but its location_changed effect (replace_disk of frosted ice) was never run. Now, on the ground and not riding, the water under the feet within radius 3 (plus one per level above 1) turns into frosted ice of age 0, where there is air above and no entity in the way. It runs with Soul Speed's location effects in tick_soul_speed, so it covers the window's player and LAN guests on the server.

The disk logic lives in the new crates/horizon-client/src/frost.rs, so the parity harness can call the same code.

Fixes #2757.

Vanilla reference

  • data/minecraft/enchantment/frost_walker.json (26.3 server jar): minecraft:location_changed, replace_disk with radius linear base 3 per level above first 1, clamped 0 to 16, height 1, offset (0, -1, 0), block_state minecraft:frosted_ice age 0, trigger_game_event block_place, requirements: on ground and not a vehicle.
  • ReplaceDisk.apply (world/item/enchantment/effects/ReplaceDisk.java): (int) radius and height, the distToCenterSqr disk, BlockPos.betweenClosed order (x fastest, then z here since the height is one block), setBlockAndUpdate and the game event only when the set succeeds.
  • UnobstructedPredicate: Level.isUnobstructed(null, Shapes.block().move(pos)), checked by the game's building blockers.
  • matching_fluids names the source fluid only, so flowing water is not frozen (FluidKind::Water).

Harness: tools/test_frost_walker_parity.py with VanillaFrostWalkerOracle.java and examples/probe/frost_walker_fixture.rs. Java runs the enchantment's own ReplaceDisk on 3764 synthetic levels (levels 1, 2, 3, 14, full water disks, random water, flowing, air and stone mixes, blocking boxes that touch, cross and miss the disk), Rust runs frost::replace_disk on the same inputs, and the cell sequences must match. A mutation check (< changed to <=) makes it fail at output line 1.

Not verified

  • Not run in a live game: the effect's trigger conditions (ground, riding, block change, landing, boots change) and the frosted ice melt tick are outside the harness.
  • The game-side adapter (is_water_source, is_unobstructed with the game's collision context) is not run by the harness; the probe uses its own world model.

Self-check

Run on Windows, python3 tools/pr_ready.py --quick --base upstream/main:

Check Result
Scope 8 files, +731 −1
Cargo.lock unchanged
Public tree ✅
rustfmt ✅
clippy (-D warnings) ✅
doc tests ✅
tests: horizon-client 1162 passed, 2 failed (crash::tests::stacks_start_at_the_panicking_frame and save::tests::session_lock_is_exclusive, both Windows-only, the branch does not touch crash.rs or save.rs)
Python tests 336 run, 2 failures and 8 errors on Windows; the same failures occur on clean main

The non-quick run with the harnesses is left to CI.

🤖 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/2871 **Author:** [@leifiyoo](https://github.com/leifiyoo) **Created:** 10/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `frost-walker-ice` --- ### 📝 Commits (2) - [`1cfe8fe`](https://github.com/horizon-rust/horizon/commit/1cfe8fea155cff1eefbbf98e4d9389abfd45b3b7) Frost Walker freezes the water under the player - [`c82a3fb`](https://github.com/horizon-rust/horizon/commit/c82a3fb6781531ae7e9f2500e4053cb3e25baf24) Frost Walker: vanilla parity harness for replace_disk ### 📊 Changes **8 files changed** (+731 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `crates/horizon-client/examples/probe/frost_walker_fixture.rs` (+178 -0) 📝 `crates/horizon-client/examples/probe/main.rs` (+2 -0) ➕ `crates/horizon-client/src/frost.rs` (+93 -0) 📝 `crates/horizon-client/src/game/enchant_effects.rs` (+87 -1) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) 📝 `crates/horizon-client/src/motion.rs` (+2 -0) ➕ `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaFrostWalkerOracle.java` (+193 -0) ➕ `tools/test_frost_walker_parity.py` (+175 -0) </details> ### 📄 Description > 🤖 Opened by leifiyoo's AI agent (Claude Code), not by leifiyoo himself. ## What and why Frost Walker did nothing in the game: the boots' enchantment level was read, but its `location_changed` effect (`replace_disk` of frosted ice) was never run. Now, on the ground and not riding, the water under the feet within radius 3 (plus one per level above 1) turns into frosted ice of age 0, where there is air above and no entity in the way. It runs with Soul Speed's location effects in `tick_soul_speed`, so it covers the window's player and LAN guests on the server. The disk logic lives in the new `crates/horizon-client/src/frost.rs`, so the parity harness can call the same code. Fixes #2757. ## Vanilla reference - `data/minecraft/enchantment/frost_walker.json` (26.3 server jar): `minecraft:location_changed`, `replace_disk` with `radius` linear base 3 per level above first 1, clamped 0 to 16, `height` 1, `offset` (0, -1, 0), `block_state` `minecraft:frosted_ice` age 0, `trigger_game_event` `block_place`, `requirements`: on ground and not a vehicle. - `ReplaceDisk.apply` (`world/item/enchantment/effects/ReplaceDisk.java`): `(int)` radius and height, the `distToCenterSqr` disk, `BlockPos.betweenClosed` order (x fastest, then z here since the height is one block), `setBlockAndUpdate` and the game event only when the set succeeds. - `UnobstructedPredicate`: `Level.isUnobstructed(null, Shapes.block().move(pos))`, checked by the game's building blockers. - `matching_fluids` names the source fluid only, so flowing water is not frozen (`FluidKind::Water`). Harness: `tools/test_frost_walker_parity.py` with `VanillaFrostWalkerOracle.java` and `examples/probe/frost_walker_fixture.rs`. Java runs the enchantment's own `ReplaceDisk` on 3764 synthetic levels (levels 1, 2, 3, 14, full water disks, random water, flowing, air and stone mixes, blocking boxes that touch, cross and miss the disk), Rust runs `frost::replace_disk` on the same inputs, and the cell sequences must match. A mutation check (`<` changed to `<=`) makes it fail at output line 1. ## Not verified - Not run in a live game: the effect's trigger conditions (ground, riding, block change, landing, boots change) and the frosted ice melt tick are outside the harness. - The game-side adapter (`is_water_source`, `is_unobstructed` with the game's collision context) is not run by the harness; the probe uses its own world model. ## Self-check Run on Windows, `python3 tools/pr_ready.py --quick --base upstream/main`: | Check | Result | | --- | --- | | Scope | 8 files, +731 −1 | | Cargo.lock | unchanged | | Public tree | ✅ | | rustfmt | ✅ | | clippy (`-D warnings`) | ✅ | | doc tests | ✅ | | tests: horizon-client | 1162 passed, 2 failed (`crash::tests::stacks_start_at_the_panicking_frame` and `save::tests::session_lock_is_exclusive`, both Windows-only, the branch does not touch `crash.rs` or `save.rs`) | | Python tests | 336 run, 2 failures and 8 errors on Windows; the same failures occur on clean `main` | The non-quick run with the harnesses is left to CI. 🤖 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 05:07:01 +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#4660
No description provided.