MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / loadConfig

Method loadConfig

src/main/java/net/optifine/shaders/Shaders.java:556–613  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

554 }
555
556 public static void loadConfig()
557 {
558 SMCLog.info("Load shaders configuration.");
559
560 try
561 {
562 if (!shaderPacksDir.exists())
563 {
564 shaderPacksDir.mkdir();
565 }
566 }
567 catch (Exception var8)
568 {
569 SMCLog.severe("Failed to open the shaderpacks directory: " + shaderPacksDir);
570 }
571
572 shadersConfig = new PropertiesOrdered();
573 shadersConfig.setProperty(EnumShaderOption.SHADER_PACK.getPropertyKey(), "");
574
575 if (configFile.exists())
576 {
577 try
578 {
579 FileReader filereader = new FileReader(configFile);
580 shadersConfig.load((Reader)filereader);
581 filereader.close();
582 }
583 catch (Exception var7)
584 {
585 ;
586 }
587 }
588
589 if (!configFile.exists())
590 {
591 try
592 {
593 storeConfig();
594 }
595 catch (Exception var6)
596 {
597 ;
598 }
599 }
600
601 EnumShaderOption[] aenumshaderoption = EnumShaderOption.values();
602
603 for (int i = 0; i < aenumshaderoption.length; ++i)
604 {
605 EnumShaderOption enumshaderoption = aenumshaderoption[i];
606 String s = enumshaderoption.getPropertyKey();
607 String s1 = enumshaderoption.getValueDefault();
608 String s2 = shadersConfig.getProperty(s, s1);
609 setEnumShaderOption(enumshaderoption, s2);
610 }
611
612 loadShaderPack();
613 }

Callers 2

startupMethod · 0.95
initGuiMethod · 0.95

Calls 12

infoMethod · 0.95
severeMethod · 0.95
getPropertyKeyMethod · 0.95
storeConfigMethod · 0.95
getValueDefaultMethod · 0.95
setEnumShaderOptionMethod · 0.95
loadShaderPackMethod · 0.95
valuesMethod · 0.80
closeMethod · 0.65
existsMethod · 0.45
loadMethod · 0.45
getPropertyMethod · 0.45

Tested by

no test coverage detected