[PR #5044] [MERGED] entities: push armor stands with flowing water and lava #6025

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5044
Author: @mulareal
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix-armor-stand-water-push-4849


📝 Commits (1)

  • 2483152 entities: push armor stands with flowing water and lava

📊 Changes

3 files changed (+204 additions, -76 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+44 -37)
📝 crates/horizon-client/src/entities/fluids.rs (+158 -37)
📝 crates/horizon-client/src/game/armor_stands.rs (+2 -2)

📄 Description

> 🤖 Opened by mulareal's AI agent (Antigravity, Gemini), not by mulareal personally.

What

  • Non-marker armor stands are now carried along by flowing water and lava currents instead of standing still in the stream.
  • Fixes #4849

Why

  • ArmorStand::in_water only checked FluidKind::Water (ignoring FluidKind::FlowingWater) and never ran EntityFluidInteraction (Entity.updateFluidHeightAndDoFluidPushing in vanilla Entity.baseTick) to apply water (0.014) or lava currents to ArmorStand.velocity.
  • ArmorStand::tick discarded horizontal velocity (wanted.x and wanted.z), zeroing x and z after SceneCollisions::resolve and again at the end of the tick instead of preserving horizontal motion and applying water (0.8) or ground/air (friction * 0.91) drag as ArmorStand.travel -> LivingEntity.travel does when hasPhysics() is true.

Fix

  • Add ArmorStand::update_fluids in crates/horizon-client/src/entities/fluids.rs (sharing EntityFluidWorld with ItemEntity::update_fluids) to compute fluid heights and push non-marker armor stands by water and lava currents.
  • Update ArmorStand::tick in crates/horizon-client/src/entities.rs to clamp velocity components below 0.003, preserve horizontal velocity across collision resolution, and apply horizontal water or block-friction drag.
  • Call ArmorStand::update_fluids before ArmorStand::tick in Game::tick_armor_stands (crates/horizon-client/src/game/armor_stands.rs).

Checked

  • Added unit test entities::fluids::tests::armor_stands_follow_flowing_water_but_markers_and_still_water_stay_in_place and verified it against the prepared 26.3 resources (2 passed).
  • Ran cargo test -p horizon-client --lib --bins --tests, cargo clippy -p horizon-client --bins --tests -- -D warnings, cargo fmt --all -- --check, and python tools/check_public_tree.py.
Check Result
Scope ✅ 3 files, +204 −76
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 484 passed
rustfmt ✅
clippy (horizon-client) ✅
tests: horizon-client ✅ 1168 passed
doc tests ✅ 0 passed
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses

🤖 Generated with Antigravity


🔄 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/5044 **Author:** [@mulareal](https://github.com/mulareal) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix-armor-stand-water-push-4849` --- ### 📝 Commits (1) - [`2483152`](https://github.com/horizon-rust/horizon/commit/24831525c03d3c93e1b801c85259ae1ff28ea632) entities: push armor stands with flowing water and lava ### 📊 Changes **3 files changed** (+204 additions, -76 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+44 -37) 📝 `crates/horizon-client/src/entities/fluids.rs` (+158 -37) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+2 -2) </details> ### 📄 Description > 🤖 Opened by mulareal's AI agent (Antigravity, Gemini), not by mulareal personally. ## What - Non-marker armor stands are now carried along by flowing water and lava currents instead of standing still in the stream. - Fixes #4849 ## Why - `ArmorStand::in_water` only checked `FluidKind::Water` (ignoring `FluidKind::FlowingWater`) and never ran `EntityFluidInteraction` (`Entity.updateFluidHeightAndDoFluidPushing` in vanilla `Entity.baseTick`) to apply water (`0.014`) or lava currents to `ArmorStand.velocity`. - `ArmorStand::tick` discarded horizontal velocity (`wanted.x` and `wanted.z`), zeroing `x` and `z` after `SceneCollisions::resolve` and again at the end of the tick instead of preserving horizontal motion and applying water (`0.8`) or ground/air (`friction * 0.91`) drag as `ArmorStand.travel` -> `LivingEntity.travel` does when `hasPhysics()` is true. ## Fix - Add `ArmorStand::update_fluids` in `crates/horizon-client/src/entities/fluids.rs` (sharing `EntityFluidWorld` with `ItemEntity::update_fluids`) to compute fluid heights and push non-marker armor stands by water and lava currents. - Update `ArmorStand::tick` in `crates/horizon-client/src/entities.rs` to clamp velocity components below `0.003`, preserve horizontal velocity across collision resolution, and apply horizontal water or block-friction drag. - Call `ArmorStand::update_fluids` before `ArmorStand::tick` in `Game::tick_armor_stands` (`crates/horizon-client/src/game/armor_stands.rs`). ## Checked - Added unit test `entities::fluids::tests::armor_stands_follow_flowing_water_but_markers_and_still_water_stay_in_place` and verified it against the prepared 26.3 resources (`2 passed`). - Ran `cargo test -p horizon-client --lib --bins --tests`, `cargo clippy -p horizon-client --bins --tests -- -D warnings`, `cargo fmt --all -- --check`, and `python tools/check_public_tree.py`. | Check | Result | |---|---| | Scope | ✅ 3 files, +204 −76 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 484 passed | | rustfmt | ✅ | | clippy (`horizon-client`) | ✅ | | tests: horizon-client | ✅ 1168 passed | | doc tests | ✅ 0 passed | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | 🤖 Generated with [Antigravity](https://antigravity.google) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:16:43 +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#6025
No description provided.