[PR #2606] [MERGED] jumpOutOfFluid: the box must be dry and entity-free (Entity.isFree) #4467

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2606
Author: @socksprox
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: t3/fix-zombie-stuck-flowing-water


📝 Commits (3)

  • b39c4b8 mobs: jumpOutOfFluid wants a dry, entity-free box
  • 2ba33bd jumpOutOfFluid: only entities a mob collides with block the hop
  • ab099b2 rustfmt

📊 Changes

1 file changed (+36 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/mobs/living.rs (+36 -6)

📄 Description

🤖 Opened by socksprox's AI agent (Devin), not by socksprox themself.

Summary

  • LivingEntity.jumpOutOfFluid checks Entity.isFree, which is noCollision(this, box) && !containsAnyLiquid(box) — the box must hold no liquid and meet no collidable entity. The mob version only tested block collisions, so a mob pressed against a wall by water flow hopped out where vanilla refuses.
  • Found while exercising #2554's current push in a mob_ai scenario: a zombie in a water + water[level=1..7] steady-state channel drifts to the end wall identically in both builds, then diverges — vanilla keeps v.y = -0.005, Horizon sets v.y = 0.3 and climbs out.
  • Adds MobWorld::contains_any_liquid (LevelReader.containsAnyLiquid) and the entity half of noCollision to the check.

Test plan

  • cargo check -p horizon-client --lib, cargo fmt --check, cargo clippy -p horizon-client --lib --bins
  • tools/parity.py mob_ai with the two local zombie_current/zombie_current_target scenarios: the zombie diverged at the wall before this change; after it, all 173 scenarios match. The scenarios themselves exercise the current push, so they can land with or after #2554 — flagged there too.

🤖 Generated with Devin


🔄 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/2606 **Author:** [@socksprox](https://github.com/socksprox) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/fix-zombie-stuck-flowing-water` --- ### 📝 Commits (3) - [`b39c4b8`](https://github.com/horizon-rust/horizon/commit/b39c4b8dd4eb0a55c8254352ab3696bba04562b1) mobs: jumpOutOfFluid wants a dry, entity-free box - [`2ba33bd`](https://github.com/horizon-rust/horizon/commit/2ba33bd1465537b3ee676a30f11134ee895a650a) jumpOutOfFluid: only entities a mob collides with block the hop - [`ab099b2`](https://github.com/horizon-rust/horizon/commit/ab099b2701d68f61ca534e8fb1b66662183461a6) rustfmt ### 📊 Changes **1 file changed** (+36 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/living.rs` (+36 -6) </details> ### 📄 Description > 🤖 Opened by socksprox's AI agent (Devin), not by socksprox themself. ## Summary - `LivingEntity.jumpOutOfFluid` checks `Entity.isFree`, which is `noCollision(this, box) && !containsAnyLiquid(box)` — the box must hold no liquid and meet no collidable entity. The mob version only tested block collisions, so a mob pressed against a wall by water flow hopped out where vanilla refuses. - Found while exercising #2554's current push in a `mob_ai` scenario: a zombie in a `water` + `water[level=1..7]` steady-state channel drifts to the end wall identically in both builds, then diverges — vanilla keeps `v.y = -0.005`, Horizon sets `v.y = 0.3` and climbs out. - Adds `MobWorld::contains_any_liquid` (`LevelReader.containsAnyLiquid`) and the entity half of `noCollision` to the check. #### Test plan - [x] `cargo check -p horizon-client --lib`, `cargo fmt --check`, `cargo clippy -p horizon-client --lib --bins` - [x] `tools/parity.py mob_ai` with the two local `zombie_current`/`zombie_current_target` scenarios: the zombie diverged at the wall before this change; after it, all 173 scenarios match. The scenarios themselves exercise the current push, so they can land with or after #2554 — flagged there too. 🤖 Generated with Devin --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:21 +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#4467
No description provided.