Fix: opening a shulker opens the all-shulkers list instead of contents - #280
Fix: opening a shulker opens the all-shulkers list instead of contents#280JoelYoung01 wants to merge 2 commits into
Conversation
…ntents. The network rework left only a server-side provider, so secondary-click fell through to the all-shulkers list. Also pass AvailableSlot.slot() so hotbar shulkers resolve correctly. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe client now registers shulker content handling and uses shared shulker recognition. Shulker contents are scanned or enumerated when enabled. Secondary-click navigation passes the stored inventory slot. ChangesShulker navigation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
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
`@src/client/java/dev/tr7zw/itemswapper/provider/ShulkerContainerProvider.java`:
- Around line 20-28: Update ShulkerContainerProvider.getItemHandlers() to check
areShulkersEnabled() before registering shulker items; return no handlers when
shulkers are disabled and preserve ShulkerHelper.getShulkerItems() when enabled,
matching the routing behavior in ItemGroupManager.getNextPage().
In `@src/main/java/dev/tr7zw/itemswapper/util/ShulkerHelper.java`:
- Around line 82-84: Update ShulkerHelper.getShulkerItems() so it no longer
exposes the mutable canonical shulkers set; return an immutable snapshot or
view, such as Set.copyOf(shulkers), while preserving the existing set contents.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ff4babf-78f0-4e13-8029-89e12ac2daf6
📒 Files selected for processing (5)
src/client/java/dev/tr7zw/itemswapper/ItemSwapperSharedMod.javasrc/client/java/dev/tr7zw/itemswapper/overlay/logic/InventoryAbstractWidget.javasrc/client/java/dev/tr7zw/itemswapper/provider/ShulkerContainerProvider.javasrc/main/java/dev/tr7zw/itemswapper/server/provider/ShulkerContainerProvider.javasrc/main/java/dev/tr7zw/itemswapper/util/ShulkerHelper.java
Prevents callers from mutating the shared shulker item set used by isShulker() and both providers. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
ShulkerContainerProviderregistration removed in the network rework (Network rework/26.2 #274), so right/middle-clicking a shulker in the inventory UI opens that box's contents again.ShulkerHelper.getShulkerItems()for client + server providers.AvailableSlot.slot()from inventory secondary-click so hotbar shulkers use the correct slot index.Fixes #279
Test plan
./gradlecw :26.2-fabric:compileClientJava compileJava testsucceedsshowHotbaron, secondary-click a hotbar shulker opens that boxdisableShulkersenabled, secondary-click does not open container contentsMade with Cursor