Search in sources :

Example 1 with ModMetadata

use of net.minecraftforge.fml.common.ModMetadata in project MinecraftForge by MinecraftForge.

the class DummyBlockReplacementTest method setup.

@BeforeClass
public static void setup() {
    System.setProperty("fml.queryResult", "confirm");
    System.setProperty("fml.doNotBackup", "true");
    Loader.instance();
    Bootstrap.register();
    Loader.instance().setupTestHarness(new DummyModContainer(new ModMetadata() {

        {
            modId = "test";
        }
    }));
}
Also used : ModMetadata(net.minecraftforge.fml.common.ModMetadata) DummyModContainer(net.minecraftforge.fml.common.DummyModContainer) BeforeClass(org.junit.BeforeClass)

Example 2 with ModMetadata

use of net.minecraftforge.fml.common.ModMetadata in project MinecraftForge by MinecraftForge.

the class ItemBlockSubstitutionRemoveRestoreTest method setup.

@BeforeClass
public static void setup() {
    Loader.instance();
    Bootstrap.register();
    myDirtInstance = new ItemMyDirt();
    Loader.instance().setupTestHarness(new DummyModContainer(new ModMetadata() {

        {
            modId = "test";
        }
    }));
    originalDirt = new ItemStack(Blocks.DIRT).getItem();
}
Also used : ModMetadata(net.minecraftforge.fml.common.ModMetadata) DummyModContainer(net.minecraftforge.fml.common.DummyModContainer) ItemStack(net.minecraft.item.ItemStack) BeforeClass(org.junit.BeforeClass)

Example 3 with ModMetadata

use of net.minecraftforge.fml.common.ModMetadata in project MinecraftForge by MinecraftForge.

the class SubstitutionRemoveRestoreTest method setup.

@BeforeClass
public static void setup() {
    Loader.instance();
    Bootstrap.register();
    Loader.instance().setupTestHarness(new DummyModContainer(new ModMetadata() {

        {
            modId = "test";
        }
    }));
}
Also used : ModMetadata(net.minecraftforge.fml.common.ModMetadata) DummyModContainer(net.minecraftforge.fml.common.DummyModContainer) BeforeClass(org.junit.BeforeClass)

Example 4 with ModMetadata

use of net.minecraftforge.fml.common.ModMetadata in project SecurityCraft by Geforce132.

the class SecurityCraft method preInit.

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    log("Starting to load....");
    log("Loading config file....");
    log(SecurityCraft.VERSION + " of SecurityCraft is for a post MC-1.6.4 version! Configuration files are useless for setting anything besides options.");
    SecurityCraft.configFile = new Configuration(event.getSuggestedConfigurationFile());
    SecurityCraft.config.setupConfiguration();
    log("Config file loaded.");
    log("Setting up handlers!");
    MinecraftForge.EVENT_BUS.register(eventHandler);
    log("Handlers registered.");
    log("Setting up network....");
    SecurityCraft.network = NetworkRegistry.INSTANCE.newSimpleChannel(SecurityCraft.MODID);
    RegistrationHandler.registerPackets(SecurityCraft.network);
    log("Network setup.");
    log("Loading mod content....");
    SetupHandler.setupBlocks();
    SetupHandler.setupMines();
    SetupHandler.setupItems();
    log("Finished loading mod content.");
    log("Regisering mod content... (PT 1/2)");
    RegistrationHandler.registerContent();
    RegistrationHandler.registerTileEntities();
    RegistrationHandler.registerRecipes();
    serverProxy.registerTextureFiles();
    ModMetadata modMeta = event.getModMetadata();
    modMeta.authorList = Arrays.asList(new String[] { "Geforce, bl4ckscor3" });
    modMeta.autogenerated = false;
    modMeta.credits = "Thanks to all of you guys for your support!";
    modMeta.description = "Adds a load of things to keep your house safe with.\nIf you like this mod, hit the green arrow\nin the corner of the forum thread!\nPlease visit the URL above for help. \n \nMessage of the update: \n" + MOTU;
    modMeta.url = "http://geforcemods.net";
    modMeta.logoFile = "/scLogo.png";
}
Also used : Configuration(net.minecraftforge.common.config.Configuration) ModMetadata(net.minecraftforge.fml.common.ModMetadata) EventHandler(net.minecraftforge.fml.common.Mod.EventHandler)

Example 5 with ModMetadata

use of net.minecraftforge.fml.common.ModMetadata in project SecurityCraft by Geforce132.

the class mod_SecurityCraft method preInit.

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    log("Starting to load....");
    log("Loading config file....");
    log(mod_SecurityCraft.VERSION + " of SecurityCraft is for a post MC-1.6.4 version! Configuration files are useless for setting anything besides options.");
    mod_SecurityCraft.configFile = new Configuration(event.getSuggestedConfigurationFile());
    mod_SecurityCraft.configHandler.setupConfiguration();
    log("Config file loaded.");
    log("Setting up handlers!");
    mod_SecurityCraft.configHandler.setupHandlers(event);
    log("Handlers registered.");
    log("Setting up network....");
    mod_SecurityCraft.network = NetworkRegistry.INSTANCE.newSimpleChannel(mod_SecurityCraft.MODID);
    mod_SecurityCraft.configHandler.setupPackets(mod_SecurityCraft.network);
    log("Network setup.");
    log("Loading mod additions....");
    mod_SecurityCraft.configHandler.setupAdditions();
    if (mod_SecurityCraft.debuggingMode) {
        mod_SecurityCraft.configHandler.setupDebugAdditions();
    }
    log("Finished loading mod additions.");
    log("Doing registering stuff... (PT 1/2)");
    mod_SecurityCraft.configHandler.setupGameRegistry();
    mod_SecurityCraft.serverProxy.setupTextureRegistry();
    serverProxy.registerTextureFiles();
    ModMetadata modMeta = event.getModMetadata();
    modMeta.authorList = Arrays.asList(new String[] { "Geforce, bl4ckscor3" });
    modMeta.autogenerated = false;
    modMeta.credits = "Thanks to all of you guys for your support!";
    modMeta.description = "Adds a load of things to keep your house safe with.\nIf you like this mod, hit the green arrow\nin the corner of the forum thread!\nPlease visit the URL above for help. \n \nMessage of the update: \n" + MOTU;
    modMeta.url = "http://geforcemods.net";
    modMeta.logoFile = "/scLogo.png";
}
Also used : Configuration(net.minecraftforge.common.config.Configuration) ModMetadata(net.minecraftforge.fml.common.ModMetadata) EventHandler(net.minecraftforge.fml.common.Mod.EventHandler) ForgeEventHandler(net.geforcemods.securitycraft.handlers.ForgeEventHandler)

Aggregations

ModMetadata (net.minecraftforge.fml.common.ModMetadata)14 DummyModContainer (net.minecraftforge.fml.common.DummyModContainer)6 BeforeClass (org.junit.BeforeClass)5 EventHandler (net.minecraftforge.fml.common.Mod.EventHandler)4 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 Configuration (net.minecraftforge.common.config.Configuration)2 JsonObject (com.google.gson.JsonObject)1 FileInputStream (java.io.FileInputStream)1 URL (java.net.URL)1 ForgeEventHandler (net.geforcemods.securitycraft.handlers.ForgeEventHandler)1 ItemStack (net.minecraft.item.ItemStack)1 DuplicateModsFoundException (net.minecraftforge.fml.common.DuplicateModsFoundException)1 Java8VersionException (net.minecraftforge.fml.common.Java8VersionException)1 LoaderException (net.minecraftforge.fml.common.LoaderException)1 MetadataCollection (net.minecraftforge.fml.common.MetadataCollection)1 MissingModsException (net.minecraftforge.fml.common.MissingModsException)1 WrongMinecraftVersionException (net.minecraftforge.fml.common.WrongMinecraftVersionException)1 ModSortingException (net.minecraftforge.fml.common.toposort.ModSortingException)1