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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
package pers.gwyog.gtneioreplugin;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import gregtech.GT_Version;
import pers.gwyog.gtneioreplugin.plugin.IMCForNEI;
import pers.gwyog.gtneioreplugin.plugin.block.ModBlocks;
import pers.gwyog.gtneioreplugin.util.CSVMaker;
import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper;
import pers.gwyog.gtneioreplugin.util.GT5UndergroundFluidHelper;
@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 = "gtneioreplugin";
public static final String NAME = "GT NEI Ore Plugin GT:NH Mod";
public static final String VERSION = GT_Version.VERSION;
public static final Logger LOG = LogManager.getLogger(NAME);
public static boolean csv = false;
public static String CSVname;
public static String CSVnameSmall;
public static int maxTooltipLines = 11;
public static final CreativeTabs creativeTab = new CreativeTabs(MODID) {
@Override
public Item getTabIconItem() {
return GameRegistry.makeItemStack("gregtech:gt.blockores", 386, 1, null)
.getItem();
}
};
@Mod.Instance(MODID)
public static GTNEIOrePlugin instance;
@EventHandler
public void preinit(FMLPreInitializationEvent event) {
Config c = new Config(event, MODID + ".cfg");
csv = c.tConfig.getBoolean(
"print csv",
"ALL",
false,
"print csv, 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");
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 init(FMLInitializationEvent event) {
ModBlocks.init();
IMCForNEI.IMCSender();
}
@EventHandler
public void onLoadComplete(FMLLoadCompleteEvent event) {
GT5OreLayerHelper.init();
GT5OreSmallHelper.init();
GT5UndergroundFluidHelper.init();
if (event.getSide() == Side.CLIENT) {
if (csv) {
new CSVMaker().run();
}
}
}
}
|