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

Summoning a mob with a "Silent" nbt tag using a spawn egg plays the ambient sound of the mob

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.13.2, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      Using a spawn egg with Silent:1b in the EntityTag plays the ambient sound when the mob is spawned.

      How to reproduce

      /give @s pig_spawn_egg{EntityTag:{Silent:1b}}
      

      The pig plays the entity.pig.ambient sound once and only then turn silent

      Code analysis

      Based on 1.13.1 decompiled using MCPConfig.

      The method EntityType.create(World, NBTTagCompound, ITextComponent, EntityPlayer, BlockPos, boolean, boolean) plays the ambient sound before applying the NBT data, which would prevent playing the sound.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Blue_future Blue_future
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: