Fix config to use new system properly, without exploding the server.

Separates server specific config into the server config file.

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-02-10 16:38:14 -05:00
1 parent f6fd800242
commit 0d379fdd6b
12 files changed
+134 -103

No files matched your search

@@ -22,6 +22,7 @@ package net.minecraftforge.fml;
import com.google.common.io.ByteStreams;
import com.google.gson.Gson;
import net.minecraftforge.common.ForgeConfig;
import net.minecraftforge.fml.loading.FMLConfig;
import net.minecraftforge.fml.loading.moddiscovery.ModInfo;
import net.minecraftforge.forgespi.language.IModInfo;
import net.minecraftforge.versions.mcp.MCPVersion;
@@ -131,16 +132,13 @@ public class VersionChecker
@Override
public void run()
{
if (ForgeConfig.GENERAL.disableVersionCheck.get())
if (!FMLConfig.runVersionCheck())
{
LOGGER.info("Global Forge version check system disabled, no further processing.");
return;
}
for (IModInfo entry : gatherMods())
{
process(entry);
}
gatherMods().forEach(this::process);
}
/**
@@ -86,8 +86,19 @@ public class ModConfig
public enum Type {
/**
* Client type config is exclusively for configuration affecting the client state.
* Graphical options, for example.
* Common mod config for configuration that needs to be loaded on both environments.
* Loaded on both servers and clients.
* Stored in the global config directory.
* Not synced.
* Suffix is "-common" by default.
*/
COMMON,
/**
* Client config is for configuration affecting the ONLY client state such as graphical options.
* Only loaded on the client side.
* Stored in the global config directory.
* Not synced.
* Suffix is "-client" by default.
*/
CLIENT,
// /**
@@ -97,7 +108,10 @@ public class ModConfig
// PLAYER,
/**
* Server type config is configuration that is associated with a server instance.
* It will be synced from a server to the client on connection.
* Only loaded during server startup.
* Stored in a server/save specific "serverconfig" directory.
* Synced to clients during connection.
* Suffix is "-server" by default.
*/
SERVER;