[PR #1989] [CLOSED] client: push dropped ItemEntity with fluid currents (#1956) #3916

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1989
Author: @iLtanaka
Created: 10/26/2026
Status: ❌ Closed

Base: main ← Head: fix/1956-water-carry-items


📝 Commits (1)

  • 74f3caa client: push dropped ItemEntity with fluid currents (#1956)

📊 Changes

2 files changed (+236 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+229 -9)
📝 crates/horizon-client/src/game.rs (+7 -1)

📄 Description

Summary

Fixes #1956.

In vanilla Minecraft:

  1. ItemEntity.tick() calls Entity.baseTick(), which calls Entity.updateFluidInteraction().
  2. Inside updateFluidInteraction(), if the entity is in water and isPushedByFluid() is true, it calls fluidInteraction.applyCurrentTo(FluidTags.WATER, this, 0.014D) (and similarly for lava currents with fast/slow speed).
  3. Then in ItemEntity.tick(), if inWater && fluidHeight > 0.1D, it applies setUnderwaterMovement() (vertical buoyancy + 0.99 damping) before move().

Previously, Horizon only checked facts.get(eye).fluid == Fluid::Water to apply vertical buoyancy and drag, but omitted fluid interaction and current accumulation, leaving dropped items stationary in flowing water streams (e.g. crop farms or water streams towards hoppers).

Changes

  • Implement ItemFluidWorld over ItemEntity bounds and assets implementing FluidInteractionWorld, CurrentTarget, FluidHeightWorld, and FluidFlowWorld.
  • Update fluid immersion and apply water (0.014) / lava currents before movement.
  • Add unit test item_entity_follows_water_currents in crates/horizon-client/src/entities.rs verifying items are pushed east by flowing water.

🔄 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/1989 **Author:** [@iLtanaka](https://github.com/iLtanaka) **Created:** 10/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/1956-water-carry-items` --- ### 📝 Commits (1) - [`74f3caa`](https://github.com/horizon-rust/horizon/commit/74f3caa88f72ce28a4b75be015c9805b0abb4a6f) client: push dropped ItemEntity with fluid currents (#1956) ### 📊 Changes **2 files changed** (+236 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+229 -9) 📝 `crates/horizon-client/src/game.rs` (+7 -1) </details> ### 📄 Description ### Summary Fixes #1956. In vanilla Minecraft: 1. `ItemEntity.tick()` calls `Entity.baseTick()`, which calls `Entity.updateFluidInteraction()`. 2. Inside `updateFluidInteraction()`, if the entity is in water and `isPushedByFluid()` is true, it calls `fluidInteraction.applyCurrentTo(FluidTags.WATER, this, 0.014D)` (and similarly for lava currents with fast/slow speed). 3. Then in `ItemEntity.tick()`, if `inWater && fluidHeight > 0.1D`, it applies `setUnderwaterMovement()` (vertical buoyancy + 0.99 damping) before `move()`. Previously, Horizon only checked `facts.get(eye).fluid == Fluid::Water` to apply vertical buoyancy and drag, but omitted fluid interaction and current accumulation, leaving dropped items stationary in flowing water streams (e.g. crop farms or water streams towards hoppers). ### Changes - Implement `ItemFluidWorld` over `ItemEntity` bounds and assets implementing `FluidInteractionWorld`, `CurrentTarget`, `FluidHeightWorld`, and `FluidFlowWorld`. - Update fluid immersion and apply water (`0.014`) / lava currents before movement. - Add unit test `item_entity_follows_water_currents` in `crates/horizon-client/src/entities.rs` verifying items are pushed east by flowing water. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:14 +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#3916
No description provided.