@@ -203,6 +203,7 @@ public static void loadModConfig(Object rootConfigObject, ModContainer modContai
203203 }
204204 net .modificationstation .stationapi .impl .config .object .ConfigCategory configCategory = new net .modificationstation .stationapi .impl .config .object .ConfigCategory (modContainer .getMetadata ().getId (), configField .getAnnotation (GConfig .class ).visibleName (), null , configField , objField , configField .isAnnotationPresent (MultiplayerSynced .class ), HashMultimap .create (), true );
205205 readDeeper (rootConfigObject , configField , modConfigFile .path ("" ), configCategory , totalReadFields , totalReadCategories , isMultiplayer , defaultEntry );
206+ readDeeper (rootConfigObject , configField , modConfigFile .path (), configCategory , totalReadFields , totalReadCategories , isMultiplayer , defaultEntry );
206207 if (!loaded ) {
207208 MOD_CONFIGS .put (configID , BiTuple .of (MOD_CONFIGS .remove (configID ).one (), configCategory ));
208209 } else {
@@ -308,8 +309,7 @@ public static String saveConfig(EntrypointContainer<Object> container, net.modif
308309 GlassYamlFile configFile = new GlassYamlFile (new File (FabricLoader .getInstance ().getConfigDir ().toFile (), container .getProvider ().getMetadata ().getId () + "/" + category .parentField .getAnnotation (GConfig .class ).value () + ".yml" ));
309310 configFile .createNewFile ();
310311 GlassYamlFile serverExported = new GlassYamlFile ();
311- // The path("") is critical for saving a shitton of copy-paste snowflake code. Thank you library maker, for not being controlling.
312- saveDeeper (configFile .path ("" ), serverExported .path ("" ), category , category .parentField , readValues , readCategories );
312+ saveDeeper (configFile .path (), serverExported .path (), category , category .parentField , readValues , readCategories );
313313
314314 if (EventStorage .PRE_SAVE_LISTENERS .containsKey (container .getProvider ().getMetadata ().getId ())) {
315315 EventStorage .PRE_SAVE_LISTENERS .get (container .getProvider ().getMetadata ().getId ()).getEntrypoint ().onPreConfigSaved (source , new GlassYamlFile (configFile .getConfigurationFile ()), configFile );
@@ -341,9 +341,9 @@ else if (entry instanceof ConfigEntry) {
341341 }
342342 Object jsonElement = configFactory .apply (((ConfigEntry <?>) entry ).value );
343343 if (!((ConfigEntry <?>) entry ).multiplayerLoaded ) {
344- YamlFileWrapper child = newValues .setChild (entry .id , jsonElement );
344+ newValues .setChild (entry .id , jsonElement );
345345 if (entry .description != null && !entry .description .isEmpty ()) {
346- child .comment (entry .description );
346+ newValues . path ( entry . id ) .comment (entry .description );
347347 }
348348 }
349349 if (entry .multiplayerSynced ) {
0 commit comments