public static void getModsFrom(File dir, File parentFile) throws Exception
	{
		if (dir.isDirectory())
		{
			for (int i = 0; i < dir.listFiles().length; i++)
			{
				if (dir.listFiles()[i].isDirectory())
				{
					getModsFrom(dir.listFiles()[i], parentFile);
				}
				else if (dir.listFiles()[i].toString().endsWith(".class"))
				{
					final URLClassLoader cl = URLClassLoader.newInstance(new URL[] { parentFile.toURI().toURL() });
					final Class<?> clazz = cl.loadClass(dir.listFiles()[i].toString().split(parentFile.getName() + "/")[1].replaceAll(".class", "").replaceAll("/", "."));

					if (clazz.isAnnotationPresent(Mod.class))
					{
						final Object mod = clazz.newInstance();
						final ModContainer mc = new ModContainer(mod);
						mc.initMethod(State.PRE_INIT);
					}
				}
			}
		}
	}