Mojira Archive
MC-114220

NBT integer arrays have trailing comma in string representation

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.

Fixed

Marcono1234

2017-02-26, 11:49 PM

2017-04-20, 05:17 PM

2017-04-20, 05:17 PM

1

1

Confirmed

NBT, comma, integer, nbt, string

Minecraft 1.11.2, Minecraft 17w06a

Minecraft 17w16a