Skip to content

tracking: make BedSim the single Bedrock movement physics oracle #13

Description

@HashimTheArab

Goal

Make BedSim the single deterministic Bedrock player-movement physics oracle used by Oomph and Baritone.

This issue tracks BedSim-owned physics and contract work. It does not move packet authority, correction policy, or path planning into BedSim.

Easiest-to-hardest order

This is an implementation-difficulty ranking, not a priority ranking. Later items depend on contracts established by earlier ones.

  1. Observability and focused regression coverage

    • Add deterministic traces, stage markers, confidence labels, and golden fixtures.
    • Add property/fuzz tests for collision and state transitions.
    • Fix small, isolated parity issues such as step grounding and already-known block constants.
  2. Existing block semantics

    • Complete and validate current ice, soul, slime, bed, web, berry-bush, powder-snow, and climbable paths.
    • Resolve honey and scaffolding behavior.
    • Add mud, snow-layer, door, gate, trapdoor, and variant-shape semantics.
  3. Effects, equipment, and item-use modifiers

    • Add speed/slowness and movement-affecting attribute modifiers.
    • Track effect duration, stacking, expiry, and amplifier semantics.
    • Replace the generic item-use clamp with per-item-category rules.
    • Synchronize equipment/enchantment state with the initiating tick.
  4. Pose, geometry, and input contract

    • Separate authoritative, client-observed, and policy-only state.
    • Add eye position, pose transitions, riding dimensions, support shape, and interaction rotation.
    • Expand input beyond the normalized move vector: raw/analogue vectors, camera orientation, tick, delta, input mode, play mode, interaction model, item actions, block actions, and vehicle data.
  5. Fluid completeness

    • Validate water/lava immersion, surface, exit, gravity, drag, flow, and side-closure rules.
    • Validate bubble-column source, overlap iteration, surface, sneak, and vehicle behavior.
    • Complete Depth Strider, Dolphin's Grace, waterlogging, and fluid/effect stacking.
  6. Special travel modes

    • Implement creative and spectator flight equations and vertical input.
    • Validate full Elytra start/stop, collision, landing, equipment, firework boost, and damage edge cases.
    • Complete Riptide eligibility, duration, collision, mounted behavior, and external-motion interaction.
  7. Revisioned world and collision model

    • Replace ad-hoc lookups with a revisioned snapshot contract.
    • Support loaded/unknown results, entity shapes, moving shapes, and world bounds.
    • Validate float32 rounding, collision epsilon, axis order, tie-breaking, substeps, penetration, high velocity, and pathological geometry.
    • Add ordered moving-piston shapes and entity collision behavior.
  8. External motion and vehicle state

    • Add an ordered, one-shot event queue for knockback, explosions, projectiles, hooks, SetActorMotion, entity pushes, vehicles, and teleports.
    • Represent replace-vs-add semantics and event acknowledgement.
    • Add mount/dismount state and prevent simultaneous player/vehicle integration.
    • Preserve fall state and damage-relevant transitions.
  9. Cross-repository migration

    • Replace duplicate physics formulas in Oomph with a BedSim adapter.
    • Route every Baritone rollout through BedSim.
    • Keep rewind/replay and authority policy in Oomph, and planning/execution policy in Baritone.

Ownership

  • BedSim: deterministic movement state transitions, travel physics, collision, poses, fluids, block effects, external-motion application, and physics traces.
  • Oomph: PlayerAuthInput decoding, tick/latency handling, acknowledgements, authority modes, corrections, history/replay, and server-event ingestion. See oomph#154.
  • Baritone: planning, goals, costs, parkour decisions, terrain actions, and executor policy. See baritone#22.

State and provider contract

  • Separate authoritative, client-observed, and policy-only state.
  • Add complete pose/geometry state: eye position, pose transitions, riding state, dimensions, scale, support shape, and interaction rotation.
  • Add complete attributes, effects, equipment, item-use, and timer state with source/expiry information.
  • Expand per-tick input beyond the normalized move vector: raw/analogue vectors, camera orientation, tick, delta, input mode, play mode, interaction model, item actions, block actions, and vehicle data.
  • Replace ad-hoc world lookups with a revisioned snapshot contract.
  • Support loaded/unknown results, liquid layers, entity shapes, moving shapes, and world bounds.
  • Add deterministic trace output for intermediate values and stage ordering.

Ground, air, poses, and collision

  • Validate exact modifier and tick ordering for ground/air acceleration, sprint, sneak, item use, effects, and friction.
  • Validate exact float32 rounding, collision epsilon, axis ordering, tie-breaking, and substep behavior.
  • Complete standing, sneaking, swimming, crawling, gliding, and riding dimensions and headroom transitions.
  • Fix or validate grounded state after step-up transitions; see #5.
  • Complete partial-shape support and moving/entity collision ordering.
  • Add penetration, high-velocity, pathological-geometry, and unloaded-world fixtures.

Block and inside-effect matrix

  • Resolve the honey movement stratum; see #3.
  • Resolve scaffolding climb, descend, stand-on-top, and fall-through behavior; see #4.
  • Validate soul blocks, ice variants, slime, beds, webs, honey, powder snow, berry bushes, mud, and all climbable variants.
  • Add stateful support for snow layers, doors, gates, trapdoors, stairs, slabs, panes, fences, walls, and waterlogged shapes.
  • Add moving piston shapes and ordered piston/entity pushes.
  • Keep contact damage, fall damage, oxygen, and hazard effects separate from velocity physics but expose the required state/events.

Fluids and special travel

  • Validate water and lava immersion, surface, exit, gravity, drag, flow, and side-closure rules.
  • Validate bubble-column source, overlap iteration, surface behavior, sneak behavior, and vehicle behavior.
  • Complete Depth Strider, Dolphin's Grace, waterlogging, and fluid/effect stacking.
  • Implement creative and spectator flight equations and vertical input.
  • Validate full Elytra start/stop, collision, landing, equipment, firework boost, and damage edge cases.
  • Complete Riptide eligibility, duration, collision, mounted behavior, and external-motion interaction. The mounted launch guard is tracked in PR #12.

Effects, equipment, and item use

  • Add speed/slowness and other movement-affecting attribute modifiers.
  • Track effect duration, stacking, expiry, and amplifier semantics.
  • Model item-use categories separately instead of relying on one generic clamp.
  • Synchronize equipment/enchantment state to the same tick as the initiating input.
  • Keep Soul Speed, Swift Sneak, Depth Strider, Riptide, Elytra, boots, and powder-snow behavior in the movement contract.

External motion and authority-neutral events

  • Add an ordered, one-shot motion-event queue for knockback, explosions, projectiles, hooks, SetActorMotion, entity pushes, vehicles, and teleports.
  • Represent replace-vs-add semantics and event acknowledgement explicitly.
  • Add mount/dismount state and prevent simultaneous player/vehicle integration.
  • Preserve fall state, bounce, damage-relevant transitions, and correction-safe external events.
  • Keep rewind/replay policy in Oomph while making BedSim deterministic for a supplied event sequence.

Validation

  • Add golden trajectories for ground, collision, poses, fluids, blocks, effects, Elytra, and Riptide.
  • Add differential fixtures for tick-order candidates and edge cases.
  • Add property/fuzz tests for collision and state transitions.
  • Require every promoted constant to have a fixture and confidence classification.
  • Replace duplicate physics formulas in Oomph and Baritone with BedSim adapter calls.

Definition of done

BedSim can deterministically reproduce every supported player travel mode from a complete tick input, revisioned world snapshot, equipment/effect state, and ordered external-event list. Oomph and Baritone consume that result instead of maintaining competing movement formulas.

Parity audit follow-up — 2026-08-20

The latest full movement pass produced the following concrete status.

Corrected in PR #14

  • Apply bubble-column impulses once per overlapping contact, preserve exact surface classification, and clear fall distance.
  • Use uncapped 0.75 bed restitution.
  • Reject shallow liquid cells whose surface does not reach the movement contact box.
  • Apply grounded Riptide vertical compensation using water/head state.
  • Preserve scaffolding descent at -0.15, skip ordinary gravity, and clear fall distance.
  • Clear fall distance on climbable contact and qualifying honey side slides.
  • Add honey 0.8 friction and frosted-ice 0.98 friction to built-in semantics.
  • Honour solid faces for same-liquid flow through waterlogged non-stair blocks.
  • Reject mounted movement instead of integrating it as ordinary on-foot movement.
  • Check the swept movement area rather than only the current chunk.

Still needs a narrower contract or dedicated implementation

  • Define exact swimming-contact retention separately from optional anticheat hardening. The current grace window is intentionally not a strict movement-oracle rule.
  • Replace generic consuming/sneaking input clamps with exact per-item and Swift Sneak movement stages, including tick ordering.
  • Complete liquid material permeability for non-liquid neighbours; face closure is now exact for same-liquid waterlogged contacts, but the world contract does not expose every material rule.
  • Implement vehicle-specific travel and mount/dismount state instead of stopping at the current mounted outcome.
  • Implement creative/spectator flight and supported no-clip transitions.
  • Narrow the complete pose/riding dimensions and vehicle-controlled input contract.
  • Add externally captured differential trajectory fixtures for ground, collision, fluids, blocks, Elytra, Riptide, and vehicles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions