Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void preInit(FMLPreInitializationEvent e){
- MinecraftForge.EVENT_BUS.register(this);
- NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
- NETWORK.registerMessage(PacketRequestFOO.Handler.class, PacketRequestFOO.class, 0, SERVER);
- if(SIDE == CLIENT){
- preInitClient(e);
- }
- else if (SIDE == SERVER){
- preInitServer(e); //currently blank
- }
- MinecraftForge.EVENT_BUS.register(FOO);
- }
- @SideOnly(CLIENT)
- private final void preInitClient(FMLPreInitializationEvent e){
- CONFIG = new Configuration(e.getSuggestedConfigurationFile());
- config();
- KeyEventHandler.load();
- MinecraftForge.EVENT_BUS.register(new ClientServerListener());
- MinecraftForge.EVENT_BUS.register(KeyEventHandler.INSTANCE);
- MinecraftForge.EVENT_BUS.register(KeyEvent.REGISTER);
- }
Add Comment
Please, Sign In to add comment