Search in sources :

Example 1 with FallbackGenerator

use of com.mcmoddev.lib.oregen.FallbackGenerator in project BaseMetals by MinecraftModDevelopmentMods.

the class CommonProxy method preInit.

/**
 * @param event
 */
public void preInit(final FMLPreInitializationEvent event) {
    Config.init();
    if ((Options.requireMMDOreSpawn()) && (!Loader.isModLoaded(SharedStrings.ORESPAWN_MODID))) {
        if (Options.fallbackOrespawn()) {
            GameRegistry.registerWorldGenerator(new FallbackGenerator(), 0);
        } else {
            final HashSet<ArtifactVersion> orespawnMod = new HashSet<>();
            orespawnMod.add(new DefaultArtifactVersion(SharedStrings.ORESPAWN_VERSION));
            throw new MissingModsException(orespawnMod, SharedStrings.ORESPAWN_MODID, SharedStrings.ORESPAWN_MISSING_TEXT);
        }
    }
    com.mcmoddev.lib.init.Materials.init();
    Materials.init();
    Fluids.init();
    ItemGroups.init();
    com.mcmoddev.lib.init.Blocks.init();
    Blocks.init();
    com.mcmoddev.lib.init.Items.init();
    Items.init();
    // icons have to be setup after the blocks and items are initialized
    VillagerTrades.init();
    MinecraftForge.EVENT_BUS.register(new EventHandler());
    IntegrationManager.INSTANCE.preInit(event);
    IntegrationManager.INSTANCE.runCallbacks("preInit");
    allsGood = true;
}
Also used : FallbackGenerator(com.mcmoddev.lib.oregen.FallbackGenerator) ArtifactVersion(net.minecraftforge.fml.common.versioning.ArtifactVersion) DefaultArtifactVersion(net.minecraftforge.fml.common.versioning.DefaultArtifactVersion) DefaultArtifactVersion(net.minecraftforge.fml.common.versioning.DefaultArtifactVersion) EventHandler(com.mcmoddev.basemetals.util.EventHandler) MissingModsException(net.minecraftforge.fml.common.MissingModsException) HashSet(java.util.HashSet)

Aggregations

EventHandler (com.mcmoddev.basemetals.util.EventHandler)1 FallbackGenerator (com.mcmoddev.lib.oregen.FallbackGenerator)1 HashSet (java.util.HashSet)1 MissingModsException (net.minecraftforge.fml.common.MissingModsException)1 ArtifactVersion (net.minecraftforge.fml.common.versioning.ArtifactVersion)1 DefaultArtifactVersion (net.minecraftforge.fml.common.versioning.DefaultArtifactVersion)1