question: public static void writeIntegerCollection ( @ Nonnull NBTTagCompound data , @ Nonnull Collection < Integer > coll ) { data . setInteger ( "size" , coll . size ( ) ) ; final int [ ] ary = new int [ coll . size ( ) ] ; int i = 0 ; for ( Integer num : coll ) { ary [ i ] = num ; i ++ ; } data . setTag ( "data" , new NBTTagIntArray ( ary ) ) ; }
target:  Writes the given collection to the NBTTagCompound as an IntArray