-
Notifications
You must be signed in to change notification settings - Fork 9
/
Ping.java
29 lines (25 loc) · 1.12 KB
/
Ping.java
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
package dmillerw.ping;
import dmillerw.ping.proxy.CommonProxy;
import dmillerw.ping.util.Reference;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION, dependencies = Reference.DEPENDENCIES, acceptableRemoteVersions = "*", guiFactory = Reference.GUI_FACTORY_CLASS)
@Mod.EventBusSubscriber
public class Ping {
@SidedProxy(serverSide = Reference.SERVER_PROXY_ClASS, clientSide = Reference.CLIENT_PROXY_CLASS)
public static CommonProxy proxy;
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
proxy.preInit(event);
proxy.syncConfig();
}
@SubscribeEvent
public static void onConfigChanged(ConfigChangedEvent.PostConfigChangedEvent event) {
if (event.getModID().equals(Reference.MOD_ID)) {
proxy.syncConfig();
}
}
}