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.
- relates to
-
MC-69320 Data tag output by /entitydata and /blockdata contains too many commas
- Resolved