mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
Clean Up Module System
This commit is contained in:
1 parent
26f44a2862
commit
11e8a06a48
14 files changed
+263
-265
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package forestry.plugins;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
@@ -8,6 +10,7 @@ import forestry.api.modules.IForestryModule;
|
||||
import forestry.api.modules.IModuleContainer;
|
||||
import forestry.modules.ForestryModules;
|
||||
import forestry.modules.ForestryPluginUtil;
|
||||
import forestry.modules.ModuleManager;
|
||||
|
||||
public class ForestryCompatPlugins implements IModuleContainer {
|
||||
private static final String MODULE_CONFIG_FILE_NAME = "modules.cfg";
|
||||
@@ -38,4 +41,9 @@ public class ForestryCompatPlugins implements IModuleContainer {
|
||||
Property prop = getModulesConfig().get(CONFIG_CATEGORY, info.moduleID(), true, comment);
|
||||
return prop.getBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfiguredModules(Collection<IForestryModule> activeModules, Collection<IForestryModule> unloadedModules) {
|
||||
ModuleManager.getInternalHandler().addModules(activeModules, unloadedModules);
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class ForestryJeiPlugin implements IModPlugin {
|
||||
public void register(IModRegistry registry) {
|
||||
IJeiHelpers jeiHelpers = registry.getJeiHelpers();
|
||||
IIngredientBlacklist ingredientBlacklist = jeiHelpers.getIngredientBlacklist();
|
||||
List<ItemStack> hiddenItems = ModuleManager.getHiddenItems();
|
||||
List<ItemStack> hiddenItems = ModuleManager.getInternalHandler().getHiddenItems();
|
||||
for (ItemStack hiddenItem : hiddenItems) {
|
||||
ingredientBlacklist.addIngredientToBlacklist(hiddenItem);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user