Skip to content

Fix Collection Case Action Sounds Playing for Other Players - Fix #143#147

Open
Superkat32 wants to merge 2 commits into
ModFest:26.1from
Superkat32:collection-case-sounds-fix
Open

Fix Collection Case Action Sounds Playing for Other Players - Fix #143#147
Superkat32 wants to merge 2 commits into
ModFest:26.1from
Superkat32:collection-case-sounds-fix

Conversation

@Superkat32

@Superkat32 Superkat32 commented Jul 15, 2026

Copy link
Copy Markdown

Simple fix for #143, where sounds from the Collection Case (adding/removing items, scrolling) would be played for nearby players. Nothing is needed for making scrolling on the client, as Collection Case actions are already client-sided (I initially assumed they weren't when Tomate and I discovered this bug, which is why it was mentioned)

I also tried to figure out #132, but it's a much more convoluted problem than you'd think. My attempted solution was "if collectable is selected and (collected or player is in creative)", bolden.

However, The type.isCreative() method in the tooltip method is not checking whether the player is in creative mode, but rather if the item is in the creative mode search screen. I don't think there is anywhere to access the information we need without mixins or a separate class to call the client Minecraft instance, so I left it.

With that, I initially fixed a bug where players can scroll through the Collection Case even if there's nothing to scroll through, but because of #132, I've opted to un-fix that for now.

Comment on lines -89 to -90
super.appendHoverText(stack, context, displayComponent, textConsumer, type);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to keep the super even if it is empty by default. It is possible a mod injects into the super method, so unless we don't want anything from that, it's better to just keep it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've actually had a case where mods and I think minecraft itself not calling super on item use made things significantly harder >.<

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.

2 participants