Search in sources :

Example 11 with IForestryModule

use of forestry.api.modules.IForestryModule in project ForestryMC by ForestryMC.

the class InternalModuleHandler method runInit.

public void runInit() {
    stage = Stage.INIT;
    for (IForestryModule module : modules) {
        Log.debug("Init Start: {}", module);
        module.doInit();
        module.registerRecipes();
        Log.debug("Init Complete: {}", module);
    }
}
Also used : IForestryModule(forestry.api.modules.IForestryModule)

Example 12 with IForestryModule

use of forestry.api.modules.IForestryModule in project ForestryMC by ForestryMC.

the class InternalModuleHandler method runPostInit.

public void runPostInit() {
    stage = Stage.POST_INIT;
    for (IForestryModule module : modules) {
        Log.debug("Post-Init Start: {}", module);
        module.postInit();
        Log.debug("Post-Init Complete: {}", module);
    }
    stage = Stage.FINISHED;
}
Also used : IForestryModule(forestry.api.modules.IForestryModule)

Example 13 with IForestryModule

use of forestry.api.modules.IForestryModule in project ForestryMC by ForestryMC.

the class ModuleManager method getLootTableFiles.

public static Set<String> getLootTableFiles() {
    Set<String> lootTableNames = new HashSet<>();
    for (IForestryModule module : loadedModules) {
        ForestryModule info = module.getClass().getAnnotation(ForestryModule.class);
        String lootTableFolder = info.lootTable();
        if (!lootTableFolder.isEmpty()) {
            lootTableNames.add(lootTableFolder);
        }
    }
    return lootTableNames;
}
Also used : ForestryModule(forestry.api.modules.ForestryModule) IForestryModule(forestry.api.modules.IForestryModule) IForestryModule(forestry.api.modules.IForestryModule) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet)

Example 14 with IForestryModule

use of forestry.api.modules.IForestryModule in project Binnie by ForestryMC.

the class ModuleContainer method runInit.

public void runInit(FMLInitializationEvent event) {
    for (IForestryModule module : loadedModules) {
        module.doInit();
        module.registerRecipes();
    }
    for (IConfigHandler handler : configHandlers) {
        handler.loadConfig();
    }
}
Also used : IForestryModule(forestry.api.modules.IForestryModule)

Aggregations

IForestryModule (forestry.api.modules.IForestryModule)14 ForestryModule (forestry.api.modules.ForestryModule)9 ArrayList (java.util.ArrayList)3 ResourceLocation (net.minecraft.util.ResourceLocation)3 Property (net.minecraftforge.common.config.Property)3 Log (forestry.core.utils.Log)2 HashSet (java.util.HashSet)2 Iterator (java.util.Iterator)2 LinkedHashMap (java.util.LinkedHashMap)2 LinkedHashSet (java.util.LinkedHashSet)2 List (java.util.List)2 Map (java.util.Map)2 Set (java.util.Set)2 ASMDataTable (net.minecraftforge.fml.common.discovery.ASMDataTable)2 Preconditions (com.google.common.base.Preconditions)1 ImmutableList (com.google.common.collect.ImmutableList)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 Lists (com.google.common.collect.Lists)1 ForestryAPI (forestry.api.core.ForestryAPI)1 IModuleContainer (forestry.api.modules.IModuleContainer)1