-
Notifications
You must be signed in to change notification settings - Fork 1
/
DOBTprox.txt
47 lines (37 loc) · 1.21 KB
/
DOBTprox.txt
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
@Mod.EventBusSubscriber
public class CommonProxy {
public static Configuration config;
public void preInit(FMLPreInitializationEvent e) {
File directory = e.getModConfigurationDirectory();
config = new Configuration(new File(directory.getPath(), "modtut.cfg"));
Config.readConfig();
}
public void init(FMLInitializationEvent e) {
}
public void postInit(FMLPostInitializationEvent e) {
if (config.hasChanged()) {
config.save();
}
@SubscribeEvent
public static void registerBlocks(RegistryEvent.Register<Block> event) {
}
@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> event) {
event.getRegistry().register(new FirstItem());
}
@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> event) {
}
}
@Mod.EventBusSubscriber(Side.CLIENT)
public class ClientProxy extends CommonProxy {
@Override
public void preInit(FMLPreInitializationEvent e) {
super.preInit(e);
}
@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
}
}
public class ServerProxy extends CommonProxy {
}