net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent Java Examples

The following examples show how to use net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SurvivalistMod.java    From Survivalist with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
public void commonSetup(FMLCommonSetupEvent event)
{
    SurvivalistRecipeBookCategories.instance();
    TorchFireEventHandling.register();
    ItemBreakingTracker.register();
    StringEventHandling.register();
    SlimeMerger.register();

    /*if (Loader.isModLoaded("crafttweaker"))
    {
        try
        {
            Class.forName("gigaherz.survivalist.integration.CraftTweakerPlugin").getMethod("init").invoke(null);
        }
        catch (Exception e)
        {
            throw new ReportedException(new CrashReport("Error initializing minetweaker integration", e));
        }
    }*/

    LOGGER.info("Registering network channel...");

    int messageNumber = 0;
    channel.registerMessage(messageNumber++, ScrapingMessage.class, ScrapingMessage::encode, ScrapingMessage::new, ScrapingMessage::handle);
    LOGGER.debug("Final message number: " + messageNumber);
}
 
Example #2
Source File: Proxy.java    From EnderStorage with MIT License 5 votes vote down vote up
public void commonSetup(FMLCommonSetupEvent event) {
    EnderStorageNetwork.init();
    EnderStorageManager.registerPlugin(new EnderItemStoragePlugin());
    EnderStorageManager.registerPlugin(new EnderLiquidStoragePlugin());
    //MinecraftForge.EVENT_BUS.register(EnderStorageRecipe.init());
    MinecraftForge.EVENT_BUS.register(new EnderStorageManager.EnderStorageSaveHandler());
    MinecraftForge.EVENT_BUS.register(new TankSynchroniser());
}
 
Example #3
Source File: XRay.java    From XRay-Mod with GNU General Public License v3.0 5 votes vote down vote up
private void onSetup(final FMLCommonSetupEvent event) {
	logger.debug(I18n.format("xray.debug.init"));

	KeyBindings.setup();
	List<BlockData.SerializableBlockData> data = blockStore.read();
	if( data.isEmpty() )
		return;

	ArrayList<BlockData> map = BlockStore.getFromSimpleBlockList(data);
	Controller.getBlockStore().setStore(map);
}
 
Example #4
Source File: MiningGadgets.java    From MiningGadgets with MIT License 4 votes vote down vote up
private void setup(final FMLCommonSetupEvent event)
{
    PacketHandler.register();
    MinecraftForge.EVENT_BUS.register(ServerTickHandler.class);
}
 
Example #5
Source File: ForgeSparkMod.java    From spark with GNU General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public void setup(FMLCommonSetupEvent e) {
    this.container = ModLoadingContext.get().getActiveContainer();
    this.configDirectory = FMLPaths.CONFIGDIR.get().resolve(this.container.getModId());
}
 
Example #6
Source File: EnderStorage.java    From EnderStorage with MIT License 4 votes vote down vote up
@SubscribeEvent
public void onCommonSetup(FMLCommonSetupEvent event) {
    proxy.commonSetup(event);
}
 
Example #7
Source File: CodeChickenLib.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
@SubscribeEvent
public void onCommonSetup(FMLCommonSetupEvent event) {
    proxy.commonSetup(event);
    config = new StandardConfigFile(Paths.get("config/ccl.cfg")).load();
    CCLNetwork.init();
}
 
Example #8
Source File: Proxy.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
public void commonSetup(FMLCommonSetupEvent event) {
}