Gamebuster

Main.class

Sep 25th, 2016
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1.     @EventHandler
  2.     public void preInit(FMLPreInitializationEvent e){
  3.         MinecraftForge.EVENT_BUS.register(this);
  4.         NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
  5.         NETWORK.registerMessage(PacketRequestFOO.Handler.class, PacketRequestFOO.class, 0, SERVER);
  6.         if(SIDE == CLIENT){
  7.             preInitClient(e);
  8.         }
  9.         else if (SIDE == SERVER){
  10.             preInitServer(e); //currently blank
  11.         }
  12.         MinecraftForge.EVENT_BUS.register(FOO);
  13.     }
  14.    
  15.     @SideOnly(CLIENT)
  16.     private final void preInitClient(FMLPreInitializationEvent e){
  17.         CONFIG = new Configuration(e.getSuggestedConfigurationFile());
  18.         config();
  19.         KeyEventHandler.load();
  20.         MinecraftForge.EVENT_BUS.register(new ClientServerListener());
  21.         MinecraftForge.EVENT_BUS.register(KeyEventHandler.INSTANCE);
  22.         MinecraftForge.EVENT_BUS.register(KeyEvent.REGISTER);
  23.     }
Add Comment
Please, Sign In to add comment