Skip to content

Add placement occupancy action contracts#126

Merged
ogyrec-o merged 1 commit into
mainfrom
api/issue-81-placement-occupancy-contract
Jun 1, 2026
Merged

Add placement occupancy action contracts#126
ogyrec-o merged 1 commit into
mainfrom
api/issue-81-placement-occupancy-contract

Conversation

@ogyrec-o

@ogyrec-o ogyrec-o commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

Adds SDK contracts needed for freven-engine#81 placement occupancy validation.

New API surface:

  • BlockWorldView::visit_collision_boxes(...)
    • allocation-free callback access to authored block collision boxes
    • placement validation must use authored collision boxes, not hardcoded Vanilla ids
  • PlayerCollisionAabb
  • CharacterPhysicsQuery::player_collision_aabb(...)
    • authoritative player body query anchored to the same action input sequence as player_position
  • ActionRejectReason::PlacementOccupied
  • ActionOutcome::RejectedWithReason(...)
  • ClientActionRejectReason::PlacementOccupied

This enables server-authoritative placement/body overlap rejection without weakening authority or putting hardcoded player/block shapes into gameplay handlers.

Non-goals

  • Does not implement engine/server validation yet.
  • Does not change runtime-loaded guest wire ActionOutcome.
  • Does not add client-side prediction admission yet.

Validation

  • cargo +stable fmt --all -- --check
  • cargo +stable test --locked --workspace
  • cargo +stable clippy --locked --workspace --all-targets -- -D warnings
  • git --no-pager diff --check

@ogyrec-o ogyrec-o self-assigned this Jun 1, 2026
@ogyrec-o ogyrec-o force-pushed the api/issue-81-placement-occupancy-contract branch from 6023507 to 2ef9102 Compare June 1, 2026 21:53
@ogyrec-o ogyrec-o merged commit 47e36c6 into main Jun 1, 2026
@ogyrec-o ogyrec-o deleted the api/issue-81-placement-occupancy-contract branch June 1, 2026 21:53
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