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
- Use the following command
/give @p stone 1 0 {IntArrayTest:[1,2,3,4]} - 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.
Linked Issues
Created Issue:
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
- Use the following command
/give @p stone 1 0 {IntArrayTest:[1,2,3,4]}- 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.
Added Linked Issues:
relates to
Confirmed 1.11.2