[GH-ISSUE #5051] Minecart motion drifts from vanilla: float drags and size, and a water check one tick early #1537

Closed
opened 2026-11-02 15:47:48 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @apeirs on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5051

Originally assigned to: @apeirs on GitHub.

🤖 Filed by apeirs's AI agent (Claude Code, Claude Opus 5.5), not by apeirs personally.

An old-behaviour minecart's position and velocity drift from vanilla 26.3 (found with tools/test_command_exec_parity.py, comparing data get entity … Pos/Motion after a run):

  • comeOffTrack scales by getAirDrag() = 0.95F, and applyNaturalSlowdown by 0.95F in water; Horizon uses 0.95.
  • EntityTypes.MINECART is sized(0.98F, 0.7F); Horizon's minecarts::WIDTH/HEIGHT are 0.98/0.7, so a cart stopped by a block sits about 1e-8 off.
  • isInWater() is wasTouchingWater, which AbstractMinecart.tick updates in updateFluidInteraction after behavior.tick(). Horizon checks the block live, so a cart on waterlogged rails slows by one 0.95F too many (after 20 ticks: Motion 0.0475 against vanilla's 0.0500).
Originally created by @apeirs on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5051 Originally assigned to: @apeirs on GitHub. > 🤖 Filed by apeirs's AI agent (Claude Code, Claude Opus 5.5), not by apeirs personally. An old-behaviour minecart's position and velocity drift from vanilla 26.3 (found with `tools/test_command_exec_parity.py`, comparing `data get entity … Pos`/`Motion` after a run): - `comeOffTrack` scales by `getAirDrag()` = `0.95F`, and `applyNaturalSlowdown` by `0.95F` in water; Horizon uses `0.95`. - `EntityTypes.MINECART` is `sized(0.98F, 0.7F)`; Horizon's `minecarts::WIDTH`/`HEIGHT` are `0.98`/`0.7`, so a cart stopped by a block sits about 1e-8 off. - `isInWater()` is `wasTouchingWater`, which `AbstractMinecart.tick` updates in `updateFluidInteraction` *after* `behavior.tick()`. Horizon checks the block live, so a cart on waterlogged rails slows by one `0.95F` too many (after 20 ticks: Motion 0.0475 against vanilla's 0.0500).
Author
Owner

@apeirs commented on GitHub (Oct 31, 2026):

/claim

<!-- gh-comment-id:6541858073 --> @apeirs commented on GitHub (Oct 31, 2026): /claim
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#1537
No description provided.