Skip to content

[1.8.9] Double Sound on Block Place with Resource Pack Override #818

Open
@hchpan

Description

@hchpan

General Information

Environment:

  • Client Minecraft Version: 1.21.1
  • Mod Loader: Fabric
  • ViaFabricPlus Version: 3.4.9
  • Other relevant mods: Fabric API
  • Server Version: 1.8.9 (e.g., Hypixel)

Bug Description

When connecting to a 1.8.9 server, placing a block plays two sounds simultaneously if a resource pack is used to override only the block's break sound. It plays both the custom break sound from the resource pack and the default vanilla place sound.

Steps to Reproduce

  1. Use a 1.21.1 Minecraft client with Fabric and the latest version of ViaFabricPlus.
  2. Create a resource pack with the following assets/minecraft/sounds.json file. This file specifically overrides the breaking sound for stone but leaves the placing sound as default.
    {
      "block.stone.break": {
        "replace": true,
        "sounds": [
          "minecraft:block/stone/break"
        ],
        "subtitle": "subtitles.block.generic.break"
      }
    }
  3. The resource pack must also contain a custom sound file at assets/minecraft/sounds/block/stone/break.ogg to make the difference audible.
  4. Enable the resource pack in the game.
  5. Connect to a 1.8.9 server (e.g., Hypixel.net).
  6. Select a Stone block and place it.

Expected Behavior

When placing a Stone block, only the default block.stone.place sound (the vanilla dig/stone sound) should be played, as it is not being modified by the resource pack.

Actual Behavior:
Two sounds are played at the same time:

  1. The custom minecraft:block/stone/break sound, which was defined in the resource pack.
  2. The default vanilla block.stone.place sound.

Possible Cause / Analysis:
This issue seems to stem from how ViaFabricPlus translates legacy sound events. The 1.8.9 server sends a single dig.stone event for both breaking and placing stone.

It appears that when receiving this dig.stone event during a block placement action, ViaFabricPlus might be incorrectly translating it into two separate sound events on the modern client:

  1. block.stone.place: This is the correct translation for the placement action, which correctly plays the vanilla sound.
  2. block.stone.break: This seems to be an erroneous or redundant translation of the same dig.stone event, which incorrectly triggers the sound overridden by the resource pack.

This results in the "double sound" effect.

Test Resource Pack:
I will attach the exact resource pack I am using to this issue to make it easier for you to reproduce and test the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions