Пример #1
0
 // @Mod.PreInit
 public void preInit(FMLPreInitializationEvent e) {
   serverSide = e.getSide().isServer();
   clientSide = e.getSide().isClient();
   if (clientSide) {
     client = initClient();
     proxy = client;
   }
   cfgFile = e.getSuggestedConfigurationFile();
   loadConfig();
   boolean[] configMarkers =
       ReflectionHelper.getPrivateValue(Configuration.class, config, "configMarkers");
   preallocateBlockIDs(configMarkers);
   preallocateItemIDs(configMarkers);
   if (client != null) client.preInit(e);
 }
Пример #2
0
 // @Mod.PostInit
 public void postInit(FMLPostInitializationEvent e) {
   registerBlocks();
   registerItems();
   registerOres();
   registerRecipes();
   registerTileEntities();
   registerRandomItems();
   registerWorldGenerators();
   registerContainers();
   registerEntities();
   registerVillagers();
   registerOther();
   if (client != null) client.postInit(e);
   if (proxy == null) proxy = this;
   NetworkRegistry.instance().registerGuiHandler(this, proxy);
   saveConfig();
 }
Пример #3
0
 // @Mod.Init
 public void init(FMLInitializationEvent e) {
   MinecraftForge.EVENT_BUS.register(this);
   if (client != null) client.init(e);
 }