QuiltMC/enigma

Mapping stats file exports are malformed

Closed this issue · 0 comments

Exporting mapping stats to a .csv file causes the file to be malformed because one of the columns contains JSON data which messes up the column splitting.

Reproduction Steps

  1. Open an enigma project
  2. Go to File -> Mapping Stats...
  3. Check one of the type checkboxes
  4. Click Generate Diagram
  5. Right-click on the generated chart and go to Save data as... -> .csv
  6. Open the .csv file

This is what the generated .csv file looks like
Screenshot 2024-08-07 141458

If you do the same thing on Fabric Enigma, it looks normal
Screenshot 2024-08-07 142210

Analysis

Quilt enigma's output contains an extra column compared to Fabric Enigma. This extra column is named namedChildren and contains JSON data which messes up everything. Upon looking into the code, namedChildren is a field stored in the stats tree, but this is also the case in Fabric Enigma, and Fabric Enigma doesn't include it in the output file.

private final Map<String, Node<T>> namedChildren = new HashMap<>();