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

Item frames play sound when item frame item is read from NBT

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.12.2, Minecraft 17w50a, Minecraft 1.13-pre1, Minecraft 1.13.1
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      Item frames play the sound entity.itemframe.add_item ("Item Frame fills") every time they read an item from NBT data. This happens when using commands like /data, but also when they are loaded from structures.

      How to reproduce

      1. Place an item frame with an item inside
      2. Have the item frame read NBT data
        /data merge entity @e[type=item_frame,limit=1] {ArbitraryTag:1b}
        

      Code analysis

      Based on 1.12.2 decompiled using MCP 9.40

      The method net.minecraft.entity.item.EntityItemFrame.setDisplayedItemWithUpdate(ItemStack, boolean) always plays the sound if there is an item in the item frame. Instead it should only do that when the second parameter (boolean) indicating whether or not the method was called by player interaction is false.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                6 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: