Skip to content

fix(sound): resolve shared Bedrock sounds by event - #437

Closed
AlexProgrammerDE wants to merge 1 commit into
ViaVersionAddons:mainfrom
StackAnvil:stackanvil/0045-use-close-sound-for-copper-trapdoors
Closed

AlexProgrammerDE wants to merge 1 commit into
ViaVersionAddons:mainfrom
StackAnvil:stackanvil/0045-use-close-sound-for-copper-trapdoors

Conversation

@AlexProgrammerDE

@AlexProgrammerDE AlexProgrammerDE commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • Copper trapdoors use open_trapdoor.copper for both opening and closing.
  • Wooden buttons and stone buttons use one click sound for pressing and releasing. Bedrock gives the actions different pitches.
  • The wood and stone sound groups also use those click sounds for power.off and power.on.
  • Tuff and tuff bricks use their placement sound names for both placing and breaking.

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 reported test 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.

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
AlexProgrammerDE marked this pull request as ready for review September 29, 2026 08:17
@AlexProgrammerDE
AlexProgrammerDE marked this pull request as draft September 29, 2026 08:25
@AlexProgrammerDE

Copy link
Copy Markdown
Collaborator Author

Letting this cook for a bit before undrafting. There are also other affected sounds I wanna fix.

@AlexProgrammerDE

Copy link
Copy Markdown
Collaborator Author
image I'll make this a new manual mapping file

@AlexProgrammerDE

Copy link
Copy Markdown
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
AlexProgrammerDE force-pushed the stackanvil/0045-use-close-sound-for-copper-trapdoors branch from 27b8080 to dd4bd26 Compare September 29, 2026 08:38
@AlexProgrammerDE AlexProgrammerDE changed the title fix(sound): use the close sound for copper trapdoors fix(sound): resolve shared Bedrock sounds by event Sep 29, 2026
@AlexProgrammerDE
AlexProgrammerDE marked this pull request as ready for review September 29, 2026 08:39
@AlexProgrammerDE

Copy link
Copy Markdown
Collaborator Author

It's out of the oven again and ready for review.

@AlexProgrammerDE
AlexProgrammerDE force-pushed the stackanvil/0045-use-close-sound-for-copper-trapdoors branch from dd4bd26 to 3172a5e Compare September 29, 2026 08:57
@Exterminate5573

Copy link
Copy Markdown
Collaborator

we match bedrocks behaviour not java

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.

3 participants