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

The "minecraft:item.elytra.flying" sound cannot be heard by other players when flying with elytra

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.1, 1.18 Pre-release 1, 1.18 Pre-release 5, 1.18, 1.18.1, 22w03a, 22w06a, 1.18.2, 1.19 Pre-release 4, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20.1, 1.21, 1.21.4
    • Confirmed
    • Networking, Sound

      The Bug:

      The "minecraft:item.elytra.flying" sound cannot be heard by other players when flying with elytra.

      Steps to Reproduce:

      1. Get two players and label them "Player A" and "Player B".
      2. Get "Player A" to stand still and have "Player B" fly past them with elytra.
      3. Get "Player A" to listen closely as this happens.
      4. Take note as to whether or not the "minecraft:item.elytra.flying" sound can be heard by other players when flying with elytra.

      Observed Behavior:

      The "minecraft:item.elytra.flying" sound cannot be heard by other players.

      Expected Behavior:

      The "minecraft:item.elytra.flying" sound would be able to be heard by all players.

      Code Analysis:

      Code analysis by Avoma can be found below.

      The following is based on a decompiled version of Minecraft 1.19 Pre-release 4 using Mojang mappings.

      net.minecraft.client.resources.sounds.ElytraOnPlayerSoundInstance.java
      public class ElytraOnPlayerSoundInstance extends AbstractTickableSoundInstance {
         ...
         private final LocalPlayer player;
         ...
         public ElytraOnPlayerSoundInstance(LocalPlayer localPlayer) {
            super(SoundEvents.ELYTRA_FLYING, SoundSource.PLAYERS, SoundInstance.createUnseededRandom());
            this.player = localPlayer;
            ...

      If we look at the above class, we can see that this sound event is only played to the local player (the player who is producing the sound) therefore making it not hearable by other players.

        1. MC-236515.mp4
          2.47 MB
        2. MC-236515.png
          MC-236515.png
          1.30 MB

            Unassigned Unassigned
            Avoma [Mod] Avoma
            Votes:
            8 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: