Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-253055

Resource packs causing each WeighedSoundEvents to duplicate Sounds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.19.1 Pre-release 1
    • 1.19
    • None
    • Community Consensus
    • (Unassigned)

      When using the new Minecraft 1.19 seed field for the sound packet it is expected to produce the same sound "variant" for each player. However, for players who are using resource packs, this is not the case. It should be noted, however, that these resource packs do not modify any sounds in any way.

       

      The reason for this is that each sound "variant" is registered again in a WeightedSoundSet for each resource pack in SoundManager.Preparations#handleRegistration.

      block.amethyst_cluster.break WeighedSoundEvents stored sounds with 0 resource packs:

       

      [Sound[minecraft:block/amethyst_cluster/break1], Sound[minecraft:block/amethyst_cluster/break2], Sound[minecraft:block/amethyst_cluster/break3], Sound[minecraft:block/amethyst_cluster/break4]] 

      block.amethyst_cluster.break WeighedSoundEvents stored sounds with 3 resource packs:

       

      [Sound[minecraft:block/amethyst_cluster/break1], Sound[minecraft:block/amethyst_cluster/break2], Sound[minecraft:block/amethyst_cluster/break3], Sound[minecraft:block/amethyst_cluster/break4], Sound[minecraft:block/amethyst_cluster/break1], Sound[minecraft:block/amethyst_cluster/break2], Sound[minecraft:block/amethyst_cluster/break3], Sound[minecraft:block/amethyst_cluster/break4], Sound[minecraft:block/amethyst_cluster/break1], Sound[minecraft:block/amethyst_cluster/break2], Sound[minecraft:block/amethyst_cluster/break3], Sound[minecraft:block/amethyst_cluster/break4], Sound[minecraft:block/amethyst_cluster/break1], Sound[minecraft:block/amethyst_cluster/break2], Sound[minecraft:block/amethyst_cluster/break3], Sound[minecraft:block/amethyst_cluster/break4]]

       

       

      It is expected that sounds are not re-registered like this, which as a result will cause sound packets sent with seeds to produce unpredictable sounds for those with resource packs.

      This issue can be reproduced by applying any resource pack and sending a sound with a certain seed, and it can be noticed that it may produce a different sound. In this case, a sound with the seed of -2471965959928200000L was used with the block.amethyst_cluster.break sound.

            boq [Mojang] Bartosz Bok
            Owen1212055 Owen
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: