Repository navigation
fix(sound): resolve shared Bedrock sounds by event - #437
Closed
AlexProgrammerDE wants to merge 1 commit into
Closed
AlexProgrammerDE wants to merge 1 commit into
AlexProgrammerDE wants to merge 1 commit into
Conversation
Bedrock uses the same sound name for opposite trapdoor, button, and block actions while Java exposes distinct sound events. Load explicit Java overrides for each Bedrock event and sound pair, leaving the source sound mappings unchanged for other packet types. Validate the override entries against the loaded Bedrock events and Java sound registry so stale mappings fail during startup.
AlexProgrammerDE
marked this pull request as ready for review
September 29, 2026 08:17
AlexProgrammerDE
marked this pull request as draft
September 29, 2026 08:25
Collaborator
Author
|
Letting this cook for a bit before undrafting. There are also other affected sounds I wanna fix. |
Collaborator
Author
Collaborator
Author
|
I was contemplating to make the sound format allow these overrides but imo thats out of scope and can be done in a followup PR if requested. |
AlexProgrammerDE
force-pushed
the
stackanvil/0045-use-close-sound-for-copper-trapdoors
branch
from
September 29, 2026 08:38
27b8080 to
dd4bd26
Compare
AlexProgrammerDE
marked this pull request as ready for review
September 29, 2026 08:39
Collaborator
Author
|
It's out of the oven again and ready for review. |
AlexProgrammerDE
force-pushed
the
stackanvil/0045-use-close-sound-for-copper-trapdoors
branch
from
September 29, 2026 08:57
dd4bd26 to
3172a5e
Compare
Collaborator
|
we match bedrocks behaviour not java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What this changes
Bedrock uses the same sound name for opposite trapdoor, button, and
block actions while Java exposes distinct sound events. Load explicit
Java overrides for each Bedrock event and sound pair, leaving the
source sound mappings unchanged for other packet types.
Validate the override entries against the loaded Bedrock events and
Java sound registry so stale mappings fail during startup.
This PR contains one patch from StackAnvil's viabedrock stack, applied alone to the pinned upstream base.
Evidence
Mojang's vanilla sound table uses one Bedrock sound name for these distinct actions:
open_trapdoor.copperfor both opening and closing.power.offandpower.on.The Java sound registry contains separate release and break events. It also contains a copper trapdoor close event and wooden button release event.
The override file selects a Java sound by Bedrock event and sound name. Other packets still use the default sound mapping. The selected Bedrock sound keeps its category, pitch, and volume.
Review focus
Please check the seven event and sound pairs against Mojang's table. The loader rejects an unknown event, a sound that the event does not use, or an unknown Java sound.
Testing
The patch applies alone to the pinned upstream base with
bun run pr check viabedrock --patch 0045-use-close-sound-for-copper-trapdoors.patch.The isolated checkout passed
./gradlew --no-daemon test checkstyleMain checkstyleTest. Gradle reportedtest NO-SOURCE; the standalone patch has no test source.The full StackAnvil series replayed and passed
./gradlew --no-daemon test checkstyleMain checkstyleTest. A data check found all seven event and sound pairs in the Bedrock table and all five targets in the Java registry. In-game audio has not been captured for these cases.