private AppEng() { FMLCommonHandler.instance().registerCrashCallable( new ModCrashEnhancement( CrashInfo.MOD_VERSION ) ); this.registration = new Registration(); MinecraftForge.EVENT_BUS.register( this.registration ); }
@EventHandler private void postInit( final FMLPostInitializationEvent event ) { final Stopwatch start = Stopwatch.createStarted(); AELog.info( "Post Initialization ( started )" ); this.registration.postInit( event ); IntegrationRegistry.INSTANCE.postInit(); FMLCommonHandler.instance().registerCrashCallable( new IntegrationCrashEnhancement() ); AppEng.proxy.postInit(); AEConfig.instance().save(); NetworkRegistry.INSTANCE.registerGuiHandler( this, GuiBridge.GUI_Handler ); NetworkHandler.init( "AE2" ); AELog.info( "Post Initialization ( ended after " + start.elapsed( TimeUnit.MILLISECONDS ) + "ms )" ); }
public static void register() { Set<IForestryModule> configDisabledModules = ModuleManager.configDisabledModules; if (!configDisabledModules.isEmpty()) { List<String> disabledModuleNames = new ArrayList<>(); for (IForestryModule module : configDisabledModules) { ForestryModule info = module.getClass().getAnnotation(ForestryModule.class); disabledModuleNames.add(info.name()); } String disabledModulesMessage = "Modules have been disabled in the config: " + Joiner.on(", ").join(disabledModuleNames); ForestryModEnvWarningCallable callable = new ForestryModEnvWarningCallable(disabledModulesMessage); FMLCommonHandler.instance().registerCrashCallable(callable); } }
@SubscribeEvent(priority = EventPriority.HIGHEST) public static void register(@Nonnull RegistryEvent.Register<Block> event) { FMLCommonHandler.instance().registerCrashCallable(new EnderIOCrashCallable()); }
@Mod.EventHandler public void onFingerprintViolation(FMLFingerprintViolationEvent event) { isSignedBuild = false; FMLCommonHandler.instance().registerCrashCallable(new ICrashCallable() { @Override public String getLabel() { return TFCConstants.MOD_NAME; } @Override public String call() { return "You are not running an official build. Please do not use this and then report bugs or issues."; } }); } }
@Subscribe public void modConstruction(FMLConstructionEvent evt) { OpenModsClassTransformer.instance().injectAsmData(evt.getASMHarvestedData()); FMLCommonHandler.instance().registerCrashCallable(new ICrashCallable() { @Override public String call() throws Exception { return OpenModsClassTransformer.instance().listStates(); } @Override public String getLabel() { return "OpenModsLib class transformers"; } }); } }
/** * Shared initialiser code between all the constructors. */ private void init() { String modId = Loader.instance().activeModContainer().getModId(); this.id = modId; log = LogManager.getLogger("Pulsar-" + modId); flightpath.setExceptionHandler(new BusExceptionHandler(modId)); FMLCommonHandler.instance().registerCrashCallable(new CrashHandler(modId, this)); // Attach us to the mods FML bus attachToContainerEventBus(this); }