Skip to content

feat: expand movement simulation parity - #6

Open
HashimTheArab wants to merge 5 commits into
mainfrom
agent/boar-movement-parity
Open

feat: expand movement simulation parity#6
HashimTheArab wants to merge 5 commits into
mainfrom
agent/boar-movement-parity

Conversation

@HashimTheArab

@HashimTheArab HashimTheArab commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expand bedsim movement parity using Boar as a behavioral reference
  • add bubble columns, Riptide, crawling, movement enchantments, dynamic collision context, and movement-sensitive block behavior
  • correct movement constants and effect amplifier/gravity handling
  • preserve and extend the hardened liquid simulation already present on main

Why

bedsim covered core ground, collision, gliding, and teleport physics but was missing several client movement paths and had a handful of numeric differences. These gaps could produce authoritative position or velocity divergence for players interacting with liquids, special blocks, poses, and movement-affecting equipment.

Impact

World adapters may optionally implement BubbleColumnProvider and MovementCollisionProvider. Player integrations may provide MovementEquipmentProvider for Depth Strider, Soul Speed, Swift Sneak, Riptide, and leather-boots behavior. Existing providers remain supported, including the legacy inventory-based Depth Strider extension.

The README documents the new optional capabilities and pose dimensions.

Validation

  • go test ./...
  • go test -race ./...
  • go vet ./...
  • git diff --check

Summary by CodeRabbit

  • New Features
    • Added crawling, descending, spin-attack, item-use, and inventory movement inputs.
    • Added support for movement enchantments, leather boots, bubble columns, riptide launches, gliding, and teleport movement.
    • Improved movement through honey, sweet berry bushes, powder snow, scaffolding, webs, liquids, and soul sand.
    • Added dynamic collision handling and pose-aware standing, sneaking, and crawling heights.
  • Bug Fixes
    • Improved sneaking, crawling, edge avoidance, jumping, bouncing, and liquid movement behavior.
    • Updated movement and gravity effects for slow falling, levitation, weaving, and gliding.
  • Documentation
    • Expanded usage guidance and documented optional movement capabilities.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The simulator expands Bedrock movement coverage with pose-aware collision, equipment-based enchantments, block effects, bubble columns, riptide, crawling, gliding, slow falling, liquid updates, and movement-parity tests. README documentation now describes the added providers and capabilities.

Changes

Movement simulation

Layer / File(s) Summary
Movement contracts and state wiring
input.go, interfaces.go, movement.go, simulator.go, README.md
Adds movement inputs, pose heights, movement effects, collision contexts, equipment providers, and documentation for optional capabilities.
Pose control and collision integration
simulation.go, dynamic_collision_test.go, player_features_test.go, parity_test.go, bedrock_semantics_test.go
Integrates crawling, sneaking, gliding, slow falling, item actions, enchantment modifiers, dynamic collision probes, edge protection, and related tests.
Block movement effects and Bedrock semantics
block_effects.go, constants.go, simulation.go, bedrock_semantics_test.go, block_effects_test.go
Adds honey, berry bush, powder snow, scaffolding, web, air, jump, bounce, and step behavior with validation.
Liquid, bubble-column, and riptide flow
liquid.go, bubble.go, movement_environment_test.go, liquid_test.go, bubble_test.go
Adds equipment-aware liquid travel, bubble-column acceleration, riptide launches, and associated environment fixtures and tests.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Simulator
  participant BubbleColumnProvider
  participant MovementEquipmentProvider
  participant WorldLiquid
  Simulator->>WorldLiquid: detect touching liquid
  Simulator->>MovementEquipmentProvider: read Riptide level and leather boots
  Simulator->>BubbleColumnProvider: query bubble-column direction
  BubbleColumnProvider-->>Simulator: return direction and surface context
  Simulator->>Simulator: apply bubble acceleration or riptide impulse
Loading

Possibly related PRs

  • oomph-ac/bedsim#2: Both changes modify liquid movement and depth-strider provider behavior.

Suggested reviewers: nopenotdark

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: expanding movement simulation parity across multiple movement behaviors.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/boar-movement-parity

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bubble.go`:
- Around line 50-60: Update the bubble-column processing loop to apply an
impulse only once per tick: after finding the first applicable column cell,
apply its direction and stop further cell processing. Preserve the existing
liquid-above and air checks, and add an integration test covering an AABB
spanning two bubble-column blocks to verify only one impulse is applied.

In `@liquid.go`:
- Around line 85-89: Update the Depth Strider selection in the equipment branch
to fall back to the legacy DepthStriderProvider when EnchantmentDepthStrider
reports level zero, while preserving equipment as authoritative for positive
levels and the existing clamping to 0–3. Add coverage for equipment with level
zero combined with an inventory DepthStriderProvider.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e24a8f37-fccd-46ee-a2da-e078c2e0e9a6

📥 Commits

Reviewing files that changed from the base of the PR and between 3a517d7 and 456eacb.

📒 Files selected for processing (17)
  • README.md
  • block_effects.go
  • block_effects_test.go
  • bubble.go
  • bubble_test.go
  • constants.go
  • dynamic_collision_test.go
  • input.go
  • interfaces.go
  • liquid.go
  • movement.go
  • movement_environment_test.go
  • parity_test.go
  • player_features_test.go
  • simulation.go
  • simulator.go
  • simulator_test.go

Comment thread bubble.go
Comment thread liquid.go

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
liquid.go (1)

53-57: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Honor PressingDescend at the liquid surface.

The new descent impulse can be immediately erased by updateSwimTravel when the player looks upward: that clamp only checks !state.WantDownSlow, while PressingDescend is also set for sneaking and DescendBlock. Skip the surface clamp when state.PressingDescend is true, and add an upward-pitch regression test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@liquid.go` around lines 53 - 57, Update the liquid surface clamp in
updateSwimTravel to also skip clamping when state.PressingDescend is true,
preserving the descent impulse for sneaking and DescendBlock while looking
upward. Add an upward-pitch regression test covering PressingDescend at the
liquid surface.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@liquid.go`:
- Around line 53-57: Update the liquid surface clamp in updateSwimTravel to also
skip clamping when state.PressingDescend is true, preserving the descent impulse
for sneaking and DescendBlock while looking upward. Add an upward-pitch
regression test covering PressingDescend at the liquid surface.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c5c2fe3-c5f4-4ca3-9f34-f9f39027144b

📥 Commits

Reviewing files that changed from the base of the PR and between 10c3d99 and 20f1d63.

📒 Files selected for processing (18)
  • bedrock_semantics_test.go
  • block_effects.go
  • block_effects_test.go
  • bubble.go
  • bubble_test.go
  • constants.go
  • dynamic_collision_test.go
  • input.go
  • interfaces.go
  • liquid.go
  • liquid_test.go
  • movement.go
  • movement_environment_test.go
  • parity_test.go
  • player_features_test.go
  • simulation.go
  • simulator.go
  • simulator_test.go
🚧 Files skipped from review as they are similar to previous changes (7)
  • movement_environment_test.go
  • bubble.go
  • bedrock_semantics_test.go
  • bubble_test.go
  • player_features_test.go
  • dynamic_collision_test.go
  • block_effects_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant