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

NBT integer arrays have trailing comma in string representation

XMLWordPrintable

    • Confirmed

      The bug

      The string representation of NBT integer arrays always has a trailing comma after the last entry. This is different to NBT lists.

      How to reproduce

      1. Use the following command
        /give @p stone 1 0 {IntArrayTest:[1,2,3,4]}
        
      2. Throw the item on the ground and inspect its NBT data
        /entitydata @e[type=item,c=1] {}
        

        → You will see that the last item in the integer array has a comma behind it

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.nbt.NBTTagIntArray.toString() adds a comma even for the last item.

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: