// Path: src/main/java/modpacktweaks/ModpackTweaks.java
// @Mod(modid = ModpackTweaks.MODID, name = ModpackTweaks.NAME, version = ModpackTweaks.VERSION, dependencies = ModpackTweaks.DEPEND)
// public class ModpackTweaks
// {
//     public static final String MODID = "modpackTweaks";
//     public static final String NAME = "ModpackTweaks";
//     public static final String DEPEND = "required-after:endercore;after:ThermalExpansion";
// 	public static final String VERSION = "@VERSION@";
//     public static final String CHANNEL = "modpacktweaks";
// 
// 	@Instance
// 	public static ModpackTweaks instance;
// 
// 	@SidedProxy(clientSide = "modpacktweaks.proxy.ClientProxy", serverSide = "modpacktweaks.proxy.CommonProxy")
// 	public static CommonProxy proxy;
// 
// 	public static BookHandler bookHandler;
// 
// 	public static final Logger logger = LogManager.getLogger("ModpackTweaks");
// 
// 	public static CreativeTabs creativeTab = new CreativeTabs("tabMT")
// 	{
// 		@Override
// 		public Item getTabIconItem()
// 		{
// 		    return ModItems.book;
// 		}
// 	};
// 
// 	@EventHandler
// 	public void preInit(FMLPreInitializationEvent event)
// 	{		
// 		ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + "/modpackTweaks/modpackTweaks.cfg"));
// 		ConfigurationHandler.loadClientsideJson();
// 		
// 		try
// 		{
// 			FileLoader.init(ConfigurationHandler.cfg, 0);
// 		}
// 		catch (IOException e)
// 		{
// 			e.printStackTrace();
// 		}
// 
// 		ConfigurationHandler.loadGuideText(FileLoader.getGuideText());
// 		ConfigurationHandler.loadChangelogText(FileLoader.getChangelogText());
// 
// 		CommandMT.initValidCommandArguments(FileLoader.getSupportedModsFile());
// 
// 		ModItems.initItems();
// 
// 		bookHandler = new BookHandler();
// 		FMLCommonHandler.instance().bus().register(bookHandler);
// 		
// 		MinecraftForge.EVENT_BUS.register(new ModEventHandler());
// 	}
// 
// 	@EventHandler
// 	public void init(FMLInitializationEvent event)
// 	{
// 		ModItems.registerRecipes();
// 	}
// 
// 	@EventHandler
// 	public void postInit(FMLPostInitializationEvent event)
// 	{
// 		if (FMLCommonHandler.instance().getSide().isClient())
// 		{
// 			try
// 			{
// 				GuiHelper.initMap();
// 			}
// 			catch (FileNotFoundException e)
// 			{
// 				e.printStackTrace();
// 			}
// 		}
// 	}
// 
// 	@EventHandler
// 	public void onFMLServerStart(FMLServerStartingEvent event)
// 	{
// 		event.registerServerCommand(new CommandMT());
// 	}
// }


import java.awt.Desktop;
import java.net.URI;
import modpacktweaks.ModpackTweaks;
package modpacktweaks.util;



public class DesktopApi {

	public static boolean browse(URI uri) {

		if (browseDESKTOP(uri))
			return true;

		return false;
	}

	private static boolean browseDESKTOP(URI uri) {

		logOut("Trying to use Desktop.getDesktop().browse() with "
				+ uri.toString());
		try {
			if (!Desktop.isDesktopSupported()) {
				logErr("Platform is not supported.");
				return false;
			}

			if (!Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
				logErr("BORWSE is not supported.");
				return false;
			}

			Desktop.getDesktop().browse(uri);

			return true;
		} catch (Throwable t) {
			logErr("Error using desktop browse.", t);
			return false;
		}
	}

	private static void logErr(String msg, Throwable t) {
// Path: src/main/java/modpacktweaks/ModpackTweaks.java
// @Mod(modid = ModpackTweaks.MODID, name = ModpackTweaks.NAME, version = ModpackTweaks.VERSION, dependencies = ModpackTweaks.DEPEND)
// public class ModpackTweaks
// {
//     public static final String MODID = "modpackTweaks";
//     public static final String NAME = "ModpackTweaks";
//     public static final String DEPEND = "required-after:endercore;after:ThermalExpansion";
// 	public static final String VERSION = "@VERSION@";
//     public static final String CHANNEL = "modpacktweaks";
// 
// 	@Instance
// 	public static ModpackTweaks instance;
// 
// 	@SidedProxy(clientSide = "modpacktweaks.proxy.ClientProxy", serverSide = "modpacktweaks.proxy.CommonProxy")
// 	public static CommonProxy proxy;
// 
// 	public static BookHandler bookHandler;
// 
// 	public static final Logger logger = LogManager.getLogger("ModpackTweaks");
// 
// 	public static CreativeTabs creativeTab = new CreativeTabs("tabMT")
// 	{
// 		@Override
// 		public Item getTabIconItem()
// 		{
// 		    return ModItems.book;
// 		}
// 	};
// 
// 	@EventHandler
// 	public void preInit(FMLPreInitializationEvent event)
// 	{		
// 		ConfigurationHandler.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + "/modpackTweaks/modpackTweaks.cfg"));
// 		ConfigurationHandler.loadClientsideJson();
// 		
// 		try
// 		{
// 			FileLoader.init(ConfigurationHandler.cfg, 0);
// 		}
// 		catch (IOException e)
// 		{
// 			e.printStackTrace();
// 		}
// 
// 		ConfigurationHandler.loadGuideText(FileLoader.getGuideText());
// 		ConfigurationHandler.loadChangelogText(FileLoader.getChangelogText());
// 
// 		CommandMT.initValidCommandArguments(FileLoader.getSupportedModsFile());
// 
// 		ModItems.initItems();
// 
// 		bookHandler = new BookHandler();
// 		FMLCommonHandler.instance().bus().register(bookHandler);
// 		
// 		MinecraftForge.EVENT_BUS.register(new ModEventHandler());
// 	}
// 
// 	@EventHandler
// 	public void init(FMLInitializationEvent event)
// 	{
// 		ModItems.registerRecipes();
// 	}
// 
// 	@EventHandler
// 	public void postInit(FMLPostInitializationEvent event)
// 	{
// 		if (FMLCommonHandler.instance().getSide().isClient())
// 		{
// 			try
// 			{
// 				GuiHelper.initMap();
// 			}
// 			catch (FileNotFoundException e)
// 			{
// 				e.printStackTrace();
// 			}
// 		}
// 	}
// 
// 	@EventHandler
// 	public void onFMLServerStart(FMLServerStartingEvent event)
// 	{
// 		event.registerServerCommand(new CommandMT());
// 	}
// }


// Path: src/main/java/modpacktweaks/util/DesktopApi.java
import java.awt.Desktop;
import java.net.URI;
import modpacktweaks.ModpackTweaks;

package modpacktweaks.util;



public class DesktopApi {

	public static boolean browse(URI uri) {

		if (browseDESKTOP(uri))
			return true;

		return false;
	}

	private static boolean browseDESKTOP(URI uri) {

		logOut("Trying to use Desktop.getDesktop().browse() with "
				+ uri.toString());
		try {
			if (!Desktop.isDesktopSupported()) {
				logErr("Platform is not supported.");
				return false;
			}

			if (!Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
				logErr("BORWSE is not supported.");
				return false;
			}

			Desktop.getDesktop().browse(uri);

			return true;
		} catch (Throwable t) {
			logErr("Error using desktop browse.", t);
			return false;
		}
	}

	private static void logErr(String msg, Throwable t) {
		ModpackTweaks.logger.error(msg);