@EventHandler public void preInit(FMLPreInitializationEvent event){ Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); canBeDeactivated = config.getBoolean("canBeDeactivated", Configuration.CATEGORY_GENERAL, true, "If the wopper can be deactivated using redstone"); wopperSpeed = config.getInt("speed", Configuration.CATEGORY_GENERAL, 10, 1, 1000, "The amount of ticks that have to pass before the wopper does a movement action again"); if(config.hasChanged()){ config.save(); } blockWopper = new BlockWopper("wopper"); GameRegistry.registerTileEntity(TileEntityWopper.class, MOD_ID+":wopper"); proxy.preInit(); }
@EventHandler public void preInit(FMLPreInitializationEvent e) { LogUtil.logDebug("Starting pre-initialization..."); configFile = BBConfigFolderLoader.getConfigFile(e); configFile.load(); BBConfig.initialize(); BBConfig.syncConfig(configFile); MinecraftForge.EVENT_BUS.register(eventHandler); network = NetworkRegistry.INSTANCE.newSimpleChannel("bbchannel"); network.registerMessage(PacketNetherBrickOvenFuelLevel.PacketHandler.class, PacketNetherBrickOvenFuelLevel.class, 0, Side.CLIENT); network.registerMessage(PacketCampfireState.PacketHandler.class, PacketCampfireState.class, 1, Side.CLIENT); RegisterTileEntities.register(); FuelRegistry.addDefaultFuels(); ElementRegistry.init(); proxy.preInit(e); }
@EventHandler public static void onServerStopped(FMLServerStoppedEvent event) { if (ModConfiguration.halloweenCheckInterval > 0) { // stop the scheduler scheduler.schedule(new Runnable() { @Override public void run() { handle.cancel(true); } }, 0, TimeUnit.SECONDS); } }
@EventHandler public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); config = new Configuration(event.getSuggestedConfigurationFile()); doConfig(); int id = 1; // Don't use 0, more easy debug. snw = NetworkRegistry.INSTANCE.newSimpleChannel(MOD_ID); snw.registerMessage(Request.Handler.class, Request.class, id++, Side.SERVER); snw.registerMessage(Data.Handler.class, Data.class, id++, Side.CLIENT); proxy.preInit(); }
@EventHandler public void preInit(FMLPreInitializationEvent event){ Util.logger = new Logger(event.getModLog()); // find the fields we need regardless of obs OpenGuiWrapper.findFields(); // register event handlers MinecraftForge.EVENT_BUS.register(new Registrar()); MinecraftForge.EVENT_BUS.register(new VersionTracker()); MinecraftForge.EVENT_BUS.register(PlayerWorldSyncServer.INSTANCE); // setup networking RemoteGuiNetworkManager.INSTANCE.preInit(event); VersionTracker.register(new UniversalRemoteVersionProvider()); proxy.preInit(event); // fix broken config issues UniversalRemoteConfiguration.validateConfig(); }
@EventHandler public void onInit(FMLInitializationEvent e) { proxy.init(); //TODO: When smores has ore voting stabilized, update and re-enable this //NBTTagCompound oresTag = new NBTTagCompound(); //oresTag.setBoolean("oreCopper", true); //oresTag.setBoolean("ingotCopper", true); //oresTag.setBoolean("dustCopper", true); //oresTag.setBoolean("gearCopper", true); //oresTag.setBoolean("plateCopper", true); //FMLInterModComms.sendMessage("smores", "recipeVote", oresTag); //Thermionics machines are *unusually* safe for charset to carry around FMLInterModComms.sendMessage("charset", "addCarry", ThermionicsBlocks.FIREBOX.getRegistryName()); FMLInterModComms.sendMessage("charset", "addCarry", ThermionicsBlocks.OVEN.getRegistryName()); FMLInterModComms.sendMessage("charset", "addCarry", ThermionicsBlocks.BATTERY_LEAD.getRegistryName()); //Avoid creative battery carry! FMLInterModComms.sendMessage("charset", "addCarry", ThermionicsBlocks.HAMMER_MILL.getRegistryName()); FMLInterModComms.sendMessage("charset", "addCarry", ThermionicsBlocks.MOTOR_CONVECTION.getRegistryName()); FMLInterModComms.sendMessage("charset", "addCarry", ThermionicsBlocks.SERGER.getRegistryName()); }
@EventHandler public void init(FMLInitializationEvent e) { proxy.init(e); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Cat", SoundEvents.RECORD_CAT, 183000000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Blocks", SoundEvents.RECORD_BLOCKS, 327000000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Chirp", SoundEvents.RECORD_CHIRP, 183000000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Far", SoundEvents.RECORD_FAR, 152400000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Mall", SoundEvents.RECORD_MALL, 190200000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Mellohi", SoundEvents.RECORD_MELLOHI, 81600000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Stal", SoundEvents.RECORD_STAL, 138000000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Strad", SoundEvents.RECORD_STRAD, 184800000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Wait", SoundEvents.RECORD_WAIT, 214800000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - Ward", SoundEvents.RECORD_WARD, 246600000)); //ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - 11", SoundEvents.RECORD_11, 66600000)); ApplicationMusicPlayer.registerDefaultSong(new ListedSong("C418 - 13", SoundEvents.RECORD_13, 154800000)); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { NetworkRegistry.INSTANCE.registerGuiHandler(Elicitation.instance, new GuiHandler()); Items.setup(); }
@EventHandler public void serverLoad(FMLServerStartingEvent event) { this.worldDir = event.getServer().getFolderName(); // Hand me that world name _SaveData save = SaveHandler.loadFactionsFromFile(Main.configDir, Main.worldDir); if (save == null) { save = new _SaveData(); // Init } TerritoryHandler.setSaveData(save); }
@EventHandler public void afterModsLoaded(FMLPostInitializationEvent event) { if (Loader.isModLoaded(Compats.IC2)) { ItemsCG.loadRecipes(); } }
@EventHandler public void load(FMLPreInitializationEvent event) { modLog = event.getModLog(); ConfigurationCG.init(event.getSuggestedConfigurationFile()); if (proxy.isClient()) { getIC2Tab(); } ItemsCG.load(); }
@EventHandler public void preInit (FMLPreInitializationEvent event) { CapabilityManager.INSTANCE.register(ITeslaConsumer.class, new CapabilityTeslaConsumer<ITeslaConsumer>(), BaseTeslaContainer.class); CapabilityManager.INSTANCE.register(ITeslaProducer.class, new CapabilityTeslaProducer<ITeslaProducer>(), BaseTeslaContainer.class); CapabilityManager.INSTANCE.register(ITeslaHolder.class, new CapabilityTeslaHolder<ITeslaHolder>(), BaseTeslaContainer.class); }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { PacketHandler.NETWORKINSTANCE.registerMessage(PacketGetWorker.Handler.class, PacketGetWorker.class, PacketHandler.nextID(), Side.SERVER); PacketHandler.NETWORKINSTANCE.registerMessage(PacketReturnWorker.Handler.class, PacketReturnWorker.class, PacketHandler.nextID(), Side.CLIENT); event.registerServerCommand(new MainCmd()); event.registerServerCommand(new GamemodeCmd()); }
@EventHandler public void preInit (FMLPreInitializationEvent event) { // Packets NETWORK.register(PacketStage.class, Side.CLIENT); NETWORK.register(PacketStageAll.class, Side.CLIENT); NETWORK.register(PacketRequestClientSync.class, Side.SERVER); CapabilityManager.INSTANCE.register(IStageData.class, new Storage(), DefaultStageData.class); MinecraftForge.EVENT_BUS.register(new PlayerDataHandler()); BookshelfRegistry.addCommand(COMMAND); BookshelfRegistry.addGameRule(GAME_RULE_SHARE_STAGES); }
@EventHandler public void preInit(FMLPreInitializationEvent event){ proxy.preInit(event); registerBlocks(); registerItems(); registerFuelHandlers(); registerTileEntities(); registerWorldGenerators(); }
@EventHandler public void init(FMLInitializationEvent e) { proxy.init(e); BBConfigFolderLoader.loadRemovedRecipes(e); RemoveRecipes.remove(); if (BBConfig.moduleFurnaces) { RemoveRecipes.removeFurnaceRecipes(); } RegisterRecipes.addShapelessRecipes(); RegisterRecipes.addShapedRecipes(); RegisterRecipes.addAdvancedRecipes(); RegisterRecipes.addFurnaceRecipes(); InfusionRepairUtil.registerVanillaEnchantsConfig(); TileEntitySmelterBase.registerDefaultBoosters(); BBConfigFolderLoader.loadRecipes(e); if(!BBConfigFolderLoader.wasLoadingSuccessfull()) { LogUtil.log(Level.ERROR, "If you have not modified the JSON recipe files, they may be corrupt. Please delete them and relaunch Minecraft, they will be regenerated." + "\n If you have modified them, check your modifications are correct."); FMLCommonHandler.instance().exitJava(0, false); } }
/** * Save the instance of the command manager and initialize the commands. * * @param event The server starting event that was fired. */ @EventHandler public void serverStarting(FMLServerStartingEvent event) { MinecraftServer server = event.getServer(); HueManager hueManager = HueManager.getInstance(); hueManager.setMinecraftServer(server); this.listener.setWorld(server.getEntityWorld()); this.commandManager = (ServerCommandManager) server.getCommandManager(); this.initCommands(); }
@EventHandler public void preInit(FMLPreInitializationEvent evt) { containerOfSelf = Loader.instance().activeModContainer(); this.setDevEnvironment(); ExPMisc.modLogger.log(LogLevel.Debug, "ExPetrum pre initializing."); AbstractRegistry.registries.add(proxy); AbstractRegistry.registries.forEach(reg -> reg.preInit(evt)); ExPMisc.modLogger.log(LogLevel.Debug, "ExPetrum pre initialized."); }
@EventHandler public void init(FMLInitializationEvent event) { if (event.getSide().isClient()) { this.client = new MalmoModClient(); this.client.init(event); } if (event.getSide().isServer()) { this.server = new MalmoModServer(); this.server.init(event); } }
@EventHandler public void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new EventHandlerClient()); MinecraftForge.EVENT_BUS.register(new EventHandlerCommon()); MinecraftForge.EVENT_BUS.register(new RenderKnowledgeTome()); proxy.preInit(); }
@EventHandler public void init(FMLPostInitializationEvent event) { ReactorInterior.registerFluid("ic2coolant", 0.66F, 0.95F, 6F, IHeatEntity.conductivityDiamond); ReactorInterior.registerFluid("ic2uu_matter", 0.9F, 0.99F, 18F, IHeatEntity.conductivityDiamond); Reactants.registerReactant("uFuel", 0, 0x46c81a); Reactants.registerReactant("plutonium", 1, 0xaaaaaa); ReactorConversions.register("uFuel", "plutonium"); Reactants.registerSolid("uraniumFuel", "uFuel"); Reactants.registerSolid("tinyPlutonium", "plutonium"); Item uraniumFuel = Item.getByNameOrId("ic2:nuclear"); if(uraniumFuel != null) { OreDictionary.registerOre("uraniumFuel", uraniumFuel); OreDictionary.registerOre("tinyPlutonium", new ItemStack(uraniumFuel, 1, 7)); } else { OreDictionary.registerOre("tinyPlutonium", new ItemStack(Item.getByNameOrId("bigreactors:ingotMetals"), 0, 1)); } Fluid fluidUranium = FluidRegistry.getFluid("uraniumfuel"); if(fluidUranium != null) Reactants.registerFluid(fluidUranium, "uFuel"); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { logger = LogManager.getLogger("lagssie"); config = new Configuration(event.getSuggestedConfigurationFile()); intervalClient = config.getFloat("intervalClient", "general", 0.25f, 0f, 1000.0f, "If the client is stuck longer than this amount of time (in seconds), dump a stacktrace of what it is doing. Set to 0 to disable."); intervalServer = config.getFloat("intervalServer", "general", 0.25f, 0f, 1000.0f, "If the server is stuck longer than this amount of time (in seconds), dump a stacktrace of what it is doing. Set to 0 to disable."); config.save(); }
@EventHandler public void init(FMLInitializationEvent evt) { ExPMisc.modLogger.log(LogLevel.Debug, "ExPetrum initializing."); AbstractRegistry.registries.forEach(reg -> reg.init(evt)); ExPMisc.modLogger.log(LogLevel.Debug, "ExPetrum initialized."); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { OneMeterRail block = new OneMeterRail(Material.CIRCUITS); block.setRegistryName("one_meter_rail"); GameRegistry.register(block); proxy.preInit(); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInitMod(); channel = new PacketChannel(Torched.MOD_NAME, PacketKeyEvent.class); UpdateChecker.registerMod(new UpdateChecker.ModVersionInfo(MOD_NAME, iChunUtil.VERSION_OF_MC, VERSION, false)); }
@EventHandler public void init(FMLServerStartingEvent event) { event.registerServerCommand(new Pyramid()); event.registerServerCommand(new Stairs()); event.registerServerCommand(new Maze()); event.registerServerCommand(new Turtle()); event.registerServerCommand(new Cube()); event.registerServerCommand(new Frame()); event.registerServerCommand(new Line()); event.registerServerCommand(new Circle()); event.registerServerCommand(new FillCircle()); event.registerServerCommand(new Sphere()); event.registerServerCommand(new Face()); }
@EventHandler public void serverStarting(FMLServerStartingEvent event) { World world = FMLCommonHandler.instance().getMinecraftServerInstance().getEntityWorld(); world.getGameRules().setOrCreateGameRule("teleportXP", "false"); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { PacketHandler.registerMessages(); File directory = event.getModConfigurationDirectory(); config = new Configuration(new File(directory.getPath(), "etheric.cfg")); Config.readConfig(); CapabilityManager.INSTANCE.register(IQuintessenceCapability.class, new QuintessenceCapabilityStorage(), DefaultQuintessenceCapability.class); proxy.preInit(event); GameRegistry.registerWorldGenerator(new EthericWorldGenerator(), 0); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { // initialize the configuration ModConfiguration.initializeConfiguration(); // register the key bindings if (event.getSide() == Side.CLIENT) ModKeyBindings.registerKeyBindings(); // register the network messages NETWORK.registerMessage(VillagerCareerMessage.MessageHandler.class, VillagerCareerMessage.class, 0, Side.CLIENT); NETWORK.registerMessage(ConfigSyncMessage.MessageHandler.class, ConfigSyncMessage.class, 1, Side.CLIENT); NETWORK.registerMessage(ConfigSyncMessage.MessageHandler.class, ConfigSyncMessage.class, 2, Side.SERVER); NETWORK.registerMessage(EntityFlagMessage.MessageHandler.class, EntityFlagMessage.class, 3, Side.SERVER); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { LOGGER = event.getModLog(); MinecraftForge.EVENT_BUS.register(new Config(event.getSuggestedConfigurationFile())); configOres = getOresConfig(event.getModConfigurationDirectory()); clientRegistry = new ClientRegistry(); MinecraftForge.EVENT_BUS.register(clientRegistry); chunkOreGen = new ChunkData(); userStates = new ArrayList<>(); ORE = new BlockOre(); ORE_VANILLA = new BlockOreVanilla(); ORE_SAMPLE = new BlockSample(); ORE_SAMPLE_VANILLA = new BlockSampleVanilla(); CLUSTER = new ItemCluster(); ALMANAC = new ItemFieldManual(); if (Config.getInstance().enableIngots) { INGOT = new ItemIngot(); } if (Config.getInstance().enableProPick) { PRO_PICK = new ItemProPick(); } registerGeolosysOreGen(); registerVanillaOreGen(); }
@EventHandler public void preInit(FMLPreInitializationEvent e) { VExConfig.preInit(); ModBlocks.init(); ModItems.init(); GameRegistry.registerTileEntity(TileEntityBlockBreaker.class, Refs.MOD_ID + ":blockBreaker"); proxy.preInit(e); }
@EventHandler public void postinit(FMLPostInitializationEvent e) { proxy.postinit(e); }
@EventHandler public void postInit(FMLPostInitializationEvent event) { PROXY.postInit(event); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { mainResourceLocation = new ResourceLocation(event.getModConfigurationDirectory() + "/lithium/images/"); }
@EventHandler public static void preInit(FMLPreInitializationEvent event) { PROXY.preInit(event); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); LootTableList.register(ENTITIES_TRUMPET_SKELETON_LOOT_TABLE); proxy.preInit(event); }
@EventHandler public void preInit(FMLPreInitializationEvent event) { ServerCatchFile=event.getSourceFile().getParentFile().toString()+"\\minecamera\\serverdata\\"; ClientCatchFile=event.getSourceFile().getParentFile().toString()+"\\minecamera\\catchdata\\"; proxy.preInit(event); }
@EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); }
@EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); }