MCPcopy Create free account
hub / github.com/BuildCraft/BuildCraft / preInit

Method preInit

common/buildcraft/core/BCCoreConfig.java:53–122  ·  view source on GitHub ↗
(File cfgFolder)

Source from the content-addressed store, hash-verified

51 private static Property propMarkerMaxDistance;
52
53 public static void preInit(File cfgFolder) {
54 config = new Configuration(new File(cfgFolder, "main.cfg"));
55
56 detailedConfigManager = new FileConfigManager(" The buildcraft detailed configuration file. This contains a lot of miscelaneous options that have no "
57 + "affect on gameplay.\n You should refer to the BC source code for a detailed description of what these do. (https://github.com/BuildCraft/BuildCraft)\n"
58 + " This file will be overwritten every time that buildcraft starts, so there is no point in adding comments");
59 detailedConfigManager.setConfigFile(new File(cfgFolder, "detailed.properties"));
60
61 // Variables to make
62 String general = Configuration.CATEGORY_GENERAL;
63 String display = "display";
64 String worldgen = "worldgen";
65
66 EnumRestartRequirement none = EnumRestartRequirement.NONE;
67 EnumRestartRequirement game = EnumRestartRequirement.GAME;
68
69 propColourBlindMode = config.get(display, "colorBlindMode", false);
70 propColourBlindMode.setComment("Should I enable colorblind mode?");
71 game.setTo(propColourBlindMode);
72
73 propWorldGen = config.get(worldgen, "enable", true);
74 propWorldGen.setComment("Should BuildCraft generate anything in the world?");
75 game.setTo(propWorldGen);
76
77 propWorldGenWaterSpring = config.get(worldgen, "generateWaterSprings", true);
78 propWorldGenWaterSpring.setComment("Should BuildCraft generate water springs?");
79 game.setTo(propWorldGenWaterSpring);
80
81 propUseLocalServerOnClient = config.get(general, "useServerDataOnClient", true);
82 propUseLocalServerOnClient.setComment("Allows BuildCraft to use the integrated server's data on the client on singleplayer worlds. Disable if you're getting the odd crash caused by it.");
83 none.setTo(propUseLocalServerOnClient);
84
85 propMinePlayerProtected = config.get(general, "miningBreaksPlayerProtectedBlocks", false);
86 propMinePlayerProtected.setComment("Should BuildCraft miners be allowed to break blocks using player-specific protection?");
87 none.setTo(propMinePlayerProtected);
88
89 propUseColouredLabels = config.get(display, "useColouredLabels", true);
90 propUseColouredLabels.setComment("Should colours be displayed as their own (or a similar) colour in tooltips?");
91 none.setTo(propUseColouredLabels);
92
93 propHidePower = config.get(display, "hidePowerValues", false);
94 propHidePower.setComment("Should all power values (MJ, MJ/t) be hidden?");
95 none.setTo(propHidePower);
96
97 propHideFluid = config.get(display, "hideFluidValues", false);
98 propHideFluid.setComment("Should all fluid values (Buckets, mB, mB/t) be hidden?");
99 none.setTo(propHideFluid);
100
101 propUseBucketsStatic = config.get(display, "useBucketsStatic", false);
102 propUseBucketsStatic.setComment("Should static fluid values be displayed in terms of buckets rather than thousandths of a bucket? (B vs mB)");
103 none.setTo(propUseBucketsStatic);
104
105 propUseBucketsFlow = config.get(display, "useBucketsFlow", false);
106 propUseBucketsFlow.setComment("Should flowing fluid values be displayed in terms of buckets per second rather than thousandths of a bucket per tick? (B/s vs mB/t)");
107 none.setTo(propUseBucketsFlow);
108
109 propItemLifespan = config.get(general, "itemLifespan", 60);
110 propItemLifespan.setMinValue(5).setMaxValue(600);

Callers 1

preInitMethod · 0.95

Calls 5

setToMethod · 0.95
reloadConfigMethod · 0.95
setConfigFileMethod · 0.80
getMethod · 0.65
registerMethod · 0.45

Tested by

no test coverage detected