Added serverside config to add additional Mods to get synced

This commit is contained in:
Frank 2021-08-21 13:56:18 +02:00
parent ffffeb78ee
commit 4f8840da68
3 changed files with 22 additions and 5 deletions

View file

@ -7,15 +7,20 @@ import ru.bclib.api.dataexchange.handler.autosync.AutoSync.ClientConfig;
import ru.bclib.api.dataexchange.handler.autosync.AutoSync.ServerConfig;
public class Configs {
// Client and Server-Config must be the first entries. They are not part of the Auto-Sync process
// But will be needed by other Auto-Sync Config-Files
@Environment(EnvType.CLIENT)
public static final ClientConfig CLIENT_CONFIG = new ClientConfig();
public static final ServerConfig SERVER_CONFIG = new ServerConfig();
public static final PathConfig GENERATOR_CONFIG = new PathConfig(BCLib.MOD_ID, "generator");
public static final PathConfig MAIN_CONFIG = new PathConfig(BCLib.MOD_ID, "main", true, true);
public static final String MAIN_PATCH_CATEGORY = "patches";
public static final PathConfig RECIPE_CONFIG = new PathConfig(BCLib.MOD_ID, "recipes");
@Environment(EnvType.CLIENT)
public static final ClientConfig CLIENT_CONFIG = new ClientConfig();
public static final ServerConfig SERVER_CONFIG = new ServerConfig();
public static void save() {
MAIN_CONFIG.saveChanges();

View file

@ -241,6 +241,7 @@ public class NamedPathConfig extends PathConfig{
public void set(ConfigToken<List<String>> what, List<String> value) {
this.setStringArray(what, value);
}
private List<String> _getStringArray(ConfigToken<List<String>> what){
return this.getStringArray(what, what.defaultValue);
}