// Path: src/main/java/wanion/unidict/UniDict.java
// @SuppressWarnings("unused")
// @Mod(modid = MOD_ID, name = MOD_NAME, version = MOD_VERSION, acceptedMinecraftVersions = MC_VERSION, dependencies = DEPENDENCIES)
// public final class UniDict
// {
// 	@Mod.Instance(MOD_ID)
// 	public static UniDict instance;
// 
// 	@SidedProxy(clientSide = CLIENT_PROXY, serverSide = SERVER_PROXY)
// 	public static CommonProxy proxy;
// 
// 	private static Logger logger;
// 
// 	public static Logger getLogger()
// 	{
// 		return logger;
// 	}
// 
// 	public static Dependencies<IDependency> getDependencies()
// 	{
// 		return proxy.dependencies;
// 	}
// 
// 	public static ResourceHandler getResourceHandler()
// 	{
// 		return proxy.dependencies.get(ResourceHandler.class);
// 	}
// 
// 	public static UniOreDictionary getUniOreDictionary()
// 	{
// 		return proxy.dependencies.get(UniOreDictionary.class);
// 	}
// 
// 	public static Config getConfig()
// 	{
// 		return Config.INSTANCE;
// 	}
// 
// 	public static UniDictAPI getAPI()
// 	{
// 		return UniDictAPI.getInstance();
// 	}
// 
// 	public static ModuleHandler getModuleHandler()
// 	{
// 		return proxy.moduleHandler;
// 	}
// 
// 	@Mod.EventHandler
// 	public void preInit(final FMLPreInitializationEvent event)
// 	{
// 		logger = event.getModLog();
// 		proxy.preInit(event);
// 	}
// 
// 	@Mod.EventHandler
// 	public void init(final FMLInitializationEvent event)
// 	{
// 		proxy.init(event);
// 	}
// 
// 	@Mod.EventHandler
// 	public void postInit(final FMLPostInitializationEvent event)
// 	{
// 		proxy.postInit(event);
// 	}
// 
// 	@Mod.EventHandler
// 	public void loadComplete(final FMLLoadCompleteEvent event)
// 	{
// 		proxy.loadComplete(event);
// 		proxy.clean();
// 	}
// 
// 	@NetworkCheckHandler
// 	public boolean matchModVersions(final Map<String, String> remoteVersions, final Side side)
// 	{
// 		return side == Side.CLIENT ? remoteVersions.containsKey(MOD_ID) : !remoteVersions.containsKey(MOD_ID) || remoteVersions.get(MOD_ID).equals(MOD_VERSION);
// 	}
// 
// 	public interface IDependency {}
// 
// 	@Retention(RetentionPolicy.RUNTIME)
// 	@Target(ElementType.TYPE)
// 	public @interface Module {}
// 
// 	@Retention(RetentionPolicy.RUNTIME)
// 	@Target(ElementType.TYPE)
// 	public @interface Integration {}
// }
// 
// Path: src/main/java/wanion/unidict/common/Reference.java
// public final class Reference
// {
// 	public static final String MOD_ID = "unidict";
// 	public static final String MOD_NAME = "UniDict";
// 	public static final String MOD_VERSION = "@version@";
// 	public static final String DEPENDENCIES = "required-after:wanionlib@[1.12.2-2.5,);after:*";
// 	public static final char SLASH = separatorChar;
// 	public static final String MC_VERSION = "[1.12,]";
// 	public static final String CLIENT_PROXY = "wanion.unidict.proxy.ClientProxy";
// 	public static final String SERVER_PROXY = "wanion.unidict.proxy.CommonProxy";
// 
// 	private Reference() {}
// }


import net.minecraftforge.common.config.Configuration;
import org.apache.commons.lang3.text.WordUtils;
import wanion.lib.module.AbstractModule;
import wanion.unidict.UniDict;
import wanion.unidict.common.Reference;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.File;
import java.util.LinkedHashSet;
import java.util.Set;
import static net.minecraftforge.fml.common.Loader.isModLoaded;
import static wanion.unidict.common.Reference.SLASH;
	}

	public static IntegrationModule getIntegrationModule()
	{
		return UniDict.getDependencies().get(IntegrationModule.class);
	}

	public void registerIntegration(@Nonnull final Class<AbstractIntegrationThread> integrationClassToRegister)
	{
		MOD_INTEGRATIONS.add(integrationClassToRegister);
	}

	@Override
	protected void init()
	{
		final Configuration config = new Configuration(new File("." + SLASH + "config" + SLASH + Reference.MOD_ID + SLASH + "IntegrationModule.cfg"));
		for (final Integration integration : Integration.values())
			if (config.get("Integrations", WordUtils.capitalizeFully(integration.name().replace("_", " ")).replace(" ", ""), integration.enabledByDefault).getBoolean() && ((integration.modId == null || isModLoaded(integration.modId)) && (integration.blackListedModId == null || !isModLoaded(integration.blackListedModId))))
				manager.add(integration.integrationClass);
		MOD_INTEGRATIONS.forEach(manager::add);
		if (config.hasChanged())
			config.save();
	}

	private enum Integration
	{
		CRAFTING(CraftingIntegration.class),
		FURNACE(FurnaceIntegration.class),
		VILLAGER(VillagerIntegration.class),
		ABYSSAL_CRAFT("abyssalcraft", AbyssalCraftIntegration.class),
// Path: src/main/java/wanion/unidict/UniDict.java
// @SuppressWarnings("unused")
// @Mod(modid = MOD_ID, name = MOD_NAME, version = MOD_VERSION, acceptedMinecraftVersions = MC_VERSION, dependencies = DEPENDENCIES)
// public final class UniDict
// {
// 	@Mod.Instance(MOD_ID)
// 	public static UniDict instance;
// 
// 	@SidedProxy(clientSide = CLIENT_PROXY, serverSide = SERVER_PROXY)
// 	public static CommonProxy proxy;
// 
// 	private static Logger logger;
// 
// 	public static Logger getLogger()
// 	{
// 		return logger;
// 	}
// 
// 	public static Dependencies<IDependency> getDependencies()
// 	{
// 		return proxy.dependencies;
// 	}
// 
// 	public static ResourceHandler getResourceHandler()
// 	{
// 		return proxy.dependencies.get(ResourceHandler.class);
// 	}
// 
// 	public static UniOreDictionary getUniOreDictionary()
// 	{
// 		return proxy.dependencies.get(UniOreDictionary.class);
// 	}
// 
// 	public static Config getConfig()
// 	{
// 		return Config.INSTANCE;
// 	}
// 
// 	public static UniDictAPI getAPI()
// 	{
// 		return UniDictAPI.getInstance();
// 	}
// 
// 	public static ModuleHandler getModuleHandler()
// 	{
// 		return proxy.moduleHandler;
// 	}
// 
// 	@Mod.EventHandler
// 	public void preInit(final FMLPreInitializationEvent event)
// 	{
// 		logger = event.getModLog();
// 		proxy.preInit(event);
// 	}
// 
// 	@Mod.EventHandler
// 	public void init(final FMLInitializationEvent event)
// 	{
// 		proxy.init(event);
// 	}
// 
// 	@Mod.EventHandler
// 	public void postInit(final FMLPostInitializationEvent event)
// 	{
// 		proxy.postInit(event);
// 	}
// 
// 	@Mod.EventHandler
// 	public void loadComplete(final FMLLoadCompleteEvent event)
// 	{
// 		proxy.loadComplete(event);
// 		proxy.clean();
// 	}
// 
// 	@NetworkCheckHandler
// 	public boolean matchModVersions(final Map<String, String> remoteVersions, final Side side)
// 	{
// 		return side == Side.CLIENT ? remoteVersions.containsKey(MOD_ID) : !remoteVersions.containsKey(MOD_ID) || remoteVersions.get(MOD_ID).equals(MOD_VERSION);
// 	}
// 
// 	public interface IDependency {}
// 
// 	@Retention(RetentionPolicy.RUNTIME)
// 	@Target(ElementType.TYPE)
// 	public @interface Module {}
// 
// 	@Retention(RetentionPolicy.RUNTIME)
// 	@Target(ElementType.TYPE)
// 	public @interface Integration {}
// }
// 
// Path: src/main/java/wanion/unidict/common/Reference.java
// public final class Reference
// {
// 	public static final String MOD_ID = "unidict";
// 	public static final String MOD_NAME = "UniDict";
// 	public static final String MOD_VERSION = "@version@";
// 	public static final String DEPENDENCIES = "required-after:wanionlib@[1.12.2-2.5,);after:*";
// 	public static final char SLASH = separatorChar;
// 	public static final String MC_VERSION = "[1.12,]";
// 	public static final String CLIENT_PROXY = "wanion.unidict.proxy.ClientProxy";
// 	public static final String SERVER_PROXY = "wanion.unidict.proxy.CommonProxy";
// 
// 	private Reference() {}
// }


// Path: src/main/java/wanion/unidict/integration/IntegrationModule.java
import net.minecraftforge.common.config.Configuration;
import org.apache.commons.lang3.text.WordUtils;
import wanion.lib.module.AbstractModule;
import wanion.unidict.UniDict;
import wanion.unidict.common.Reference;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.io.File;
import java.util.LinkedHashSet;
import java.util.Set;
import static net.minecraftforge.fml.common.Loader.isModLoaded;
import static wanion.unidict.common.Reference.SLASH;

	}

	public static IntegrationModule getIntegrationModule()
	{
		return UniDict.getDependencies().get(IntegrationModule.class);
	}

	public void registerIntegration(@Nonnull final Class<AbstractIntegrationThread> integrationClassToRegister)
	{
		MOD_INTEGRATIONS.add(integrationClassToRegister);
	}

	@Override
	protected void init()
	{
		final Configuration config = new Configuration(new File("." + SLASH + "config" + SLASH + Reference.MOD_ID + SLASH + "IntegrationModule.cfg"));
		for (final Integration integration : Integration.values())
			if (config.get("Integrations", WordUtils.capitalizeFully(integration.name().replace("_", " ")).replace(" ", ""), integration.enabledByDefault).getBoolean() && ((integration.modId == null || isModLoaded(integration.modId)) && (integration.blackListedModId == null || !isModLoaded(integration.blackListedModId))))
				manager.add(integration.integrationClass);
		MOD_INTEGRATIONS.forEach(manager::add);
		if (config.hasChanged())
			config.save();
	}

	private enum Integration
	{
		CRAFTING(CraftingIntegration.class),
		FURNACE(FurnaceIntegration.class),
		VILLAGER(VillagerIntegration.class),
		ABYSSAL_CRAFT("abyssalcraft", AbyssalCraftIntegration.class),
		ACTUALLY_ADDITIONS("actuallyadditions", ActuallyAdditionsIntegration.class),