fixed config init is not called on client side

This commit is contained in:
2016-07-25 23:00:58 +02:00
parent bb9bc335ff
commit bfb3c3902e
2 changed files with 4 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
public class TAIGAConfiguration { public class TAIGAConfiguration {
@@ -73,8 +74,6 @@ public class TAIGAConfiguration {
if (readFieldsFromConfig) { if (readFieldsFromConfig) {
//If getInt cannot get an integer value from the config file value of myInteger (e.g. corrupted file)
// it will set it to the default value passed to the function
oreResistenceFactor = resMultiplier.getInt(RESMUT_DEFAULT_VALUE); oreResistenceFactor = resMultiplier.getInt(RESMUT_DEFAULT_VALUE);
if (oreResistenceFactor > RESMUT_MAX_VALUE || oreResistenceFactor < RESMUT_MIN_VALUE) { if (oreResistenceFactor > RESMUT_MAX_VALUE || oreResistenceFactor < RESMUT_MIN_VALUE) {
oreResistenceFactor = RESMUT_DEFAULT_VALUE; oreResistenceFactor = RESMUT_DEFAULT_VALUE;
@@ -89,6 +88,8 @@ public class TAIGAConfiguration {
if (config.hasChanged()) { if (config.hasChanged()) {
config.save(); config.save();
} }
System.out.println(Arrays.toString(config.getCategoryNames().toArray()));
} }
public static class ConfigEventHandler { public static class ConfigEventHandler {

View File

@@ -115,6 +115,7 @@ public class ClientProxy extends CommonProxy {
@Override @Override
public void initConfig() { public void initConfig() {
super.initConfig();
TAIGAConfiguration.clientPreInit(); TAIGAConfiguration.clientPreInit();
} }