Skip to content

Implement bundle related keys & ChangeInventoryEvent.ValueChange for bundle selected index change - #4333

Open
avaruus1 wants to merge 9 commits into
SpongePowered:api-17from
avaruus1:bundle-selected-item-change-event
Open

avaruus1 wants to merge 9 commits into
SpongePowered:api-17from
avaruus1:bundle-selected-item-change-event

Conversation

@avaruus1

@avaruus1 avaruus1 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Sponge | SpongeAPI

Implement keys for accessing DataComponents.BUNDLE_CONTENTS related values. Implement ChangeInventoryEvent.ValueChange for bundle selected item index.

No other inventory event was fired due to vanilla's BundleContents excluding the selected slot.

Another Keys.INVENTORY use case for ItemStacks is accessing container contents of an item (for example, shulker box). A supports condition was added to allow both to work.

One use case for the bundle index change event is scroll detection, demonstrated in the test plugin and the following video:

2026-11-23.01-28-35.mp4

@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.44444% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../data/provider/item/stack/BundleItemStackData.java 95.34% 1 Missing and 1 partial ⚠️
...nventory/AbstractContainerMenuMixin_Inventory.java 92.59% 0 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@avaruus1 avaruus1 changed the title Bundle selected item change event Implement bundle related keys & ChangeInventoryEvent.ValueChange for bundle selected index change Nov 22, 2026
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