1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
package pers.gwyog.gtneioreplugin;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.relauncher.Side;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper;
import pers.gwyog.gtneioreplugin.util.GuiRecipeHelper;
@Mod(modid = GTNEIOrePlugin.MODID, name = GTNEIOrePlugin.NAME, version = GTNEIOrePlugin.VERSION, dependencies = "required-after:gregtech;required-after:NotEnoughItems")
public class GTNEIOrePlugin {
public static final String MODID = "GRADLETOKEN_MODID";
public static final String NAME = "GRADLETOKEN_MODNAME";
public static final String VERSION = "GRADLETOKEN_VERSION";
public static final Logger LOG = LogManager.getLogger(NAME);
public static boolean csv = false;
public static String CSVname;
public static String CSVnameSmall;
public static boolean toolTips = true;
public static int maxTooltipLines = 11;
@Mod.Instance(MODID)
public static GTNEIOrePlugin instance;
@EventHandler
public void preinit(FMLPreInitializationEvent event) {
Config c = new Config(event, this.MODID + ".cfg");
csv = c.tConfig.getBoolean("print csv", "ALL", false, "princsv, you need apache commons collections to be injected in the minecraft jar.");
CSVname = c.tConfig.getString("CSV_name", "ALL", event.getModConfigurationDirectory() + "/GTNH-Oresheet.csv", "rename the oresheet here, it will appear in /config");
CSVnameSmall= c.tConfig.getString("CSV_name_for_Small_Ore_Sheet", "ALL", event.getModConfigurationDirectory() + "/GTNH-Small-Ores-Sheet.csv", "rename the oresheet here, it will appear in /config");
toolTips = c.tConfig.getBoolean("DimTooltip", "ALL", true, "Activates Dimension Tooltips");
maxTooltipLines = c.tConfig.getInt("MaxToolTipLines", "ALL", 11, 1, Integer.MAX_VALUE, "Maximum number of lines the dimension names tooltip can have before it wraps around.");
c.save();
}
@EventHandler
public void onLoadComplete(FMLLoadCompleteEvent event) {
if (event.getSide() == Side.CLIENT) {
new GT5OreLayerHelper();
new GT5OreSmallHelper();
new GuiRecipeHelper();
if (csv) {
new pers.gwyog.gtneioreplugin.util.CSVMaker().run();
}
}
}
}
|