Skip to content

fix: detect non-collidable cobweb volume - #8

Merged
HashimTheArab merged 2 commits into
mainfrom
agent/fix-oomph-movement-parity
Jul 21, 2026
Merged

fix: detect non-collidable cobweb volume#8
HashimTheArab merged 2 commits into
mainfrom
agent/fix-oomph-movement-parity

Conversation

@HashimTheArab

@HashimTheArab HashimTheArab commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • detect cobweb contact using the occupied block volume rather than collision geometry
  • preserve non-origin coordinate handling
  • cover Dragonfly cobwebs whose model intentionally has no collision boxes

Verification

  • go build ./...
  • go vet ./...
  • go test ./...

Summary by CodeRabbit

  • Bug Fixes
    • Improved cobweb detection so players are correctly recognized as inside a cobweb even when collision data is missing.
    • Cobweb contact now uses the full block area for more consistent and accurate collision behavior.
  • Tests
    • Updated and added coverage to verify cobweb detection with both translated cobwebs and environments lacking cobweb collision boxes.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ef4c65c7-bb33-42a5-9b31-7b97220dd73b

📥 Commits

Reviewing files that changed from the base of the PR and between b032407 and 79a0b06.

📒 Files selected for processing (1)
  • simulator_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • simulator_test.go

📝 Walkthrough

Walkthrough

Cobweb detection now intersects the player bounding box with each cobweb block’s full unit volume rather than reported collision boxes. Tests cover translated volumes and worlds that provide no collision boxes.

Changes

Cobweb detection

Layer / File(s) Summary
Full-block cobweb intersection
simulation.go
isInsideCobweb uses the cobweb block’s translated unit cube for intersection checks instead of BlockCollisions.
Cobweb volume validation
simulator_test.go
Adds a world with no collision boxes, renames the translated-volume test, and verifies detection within the full cobweb block volume.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • oomph-ac/bedsim#6: Modifies the simulator’s cobweb/web handling in the same codepath.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: cobweb contact detection now uses the block volume even when collision boxes are absent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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/fix-oomph-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.

Caution

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

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

158-165: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Refresh the stale failure message.

The renamed volume-based test still reports a “block-local cobweb box” collision. Update the message to describe intersection with the translated full block volume so failures point to the current behavior.

🤖 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 `@simulator_test.go` around lines 158 - 165, Update the failure message in
TestInsideCobwebTranslatesBlockVolume to describe intersection with the
translated full block volume instead of a block-local cobweb box; leave the test
behavior unchanged.
🤖 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 `@simulator_test.go`:
- Around line 158-165: Update the failure message in
TestInsideCobwebTranslatesBlockVolume to describe intersection with the
translated full block volume instead of a block-local cobweb box; leave the test
behavior unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6247bfbf-e0f9-4f65-add5-a9a513f275f1

📥 Commits

Reviewing files that changed from the base of the PR and between 82a19cb and b032407.

📒 Files selected for processing (2)
  • simulation.go
  • simulator_test.go

@HashimTheArab
HashimTheArab merged commit 9baeb2a into main Jul 21, 2026
1 check passed
@HashimTheArab
HashimTheArab deleted the agent/fix-oomph-movement-parity branch July 21, 2026 06:34
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