// Path: src/main/java/ca/wescook/nutrition/Nutrition.java
// @Mod(
// 	modid = MODID,
// 	name = MODNAME,
// 	version = "@VERSION@",
// 	acceptedMinecraftVersions = FORGE_VERSIONS,
// 	acceptableRemoteVersions = "*"
// )
// 
// public class Nutrition {
// 	public static final String MODID = "nutrition";
// 	public static final String MODNAME = "Nutrition";
// 	public static final String FORGE_VERSIONS = "[1.12,1.13)";
// 
// 	// Create instance of mod
// 	@Mod.Instance
// 	public static Nutrition instance;
// 
// 	// Create instance of proxy
// 	// This will vary depending on if the client or server is running
// 	@SidedProxy(
// 		clientSide="ca.wescook.nutrition.proxy.ClientProxy",
// 		serverSide="ca.wescook.nutrition.proxy.ServerProxy"
// 	)
// 	public static IProxy proxy;
// 
// 	// Events
// 	@EventHandler
// 	public void preInit(FMLPreInitializationEvent event) {
// 		Config.registerConfigs(event.getModConfigurationDirectory()); // Load Config file
// 		ModPacketHandler.registerMessages(); // Register network messages
// 		CapabilityManager.register(); // Register capability
// 
// 		ModPotions.createPotions(); // Register custom potions
// 		MinecraftForge.EVENT_BUS.register(new EventRegistry()); // Register custom potions
// 		MinecraftForge.EVENT_BUS.register(new EventPlayerJoinWorld()); // Attach capability to player
// 		MinecraftForge.EVENT_BUS.register(new EventPlayerDeath()); // Player death and warping
// 		MinecraftForge.EVENT_BUS.register(new EventEatFood()); // Register use item event
// 		MinecraftForge.EVENT_BUS.register(new EventWorldTick()); // Register update event for nutrition decay and potion effects
// 
// 		Nutrition.proxy.preInit(event);
// 	}
// 
// 	@EventHandler
// 	public void init(FMLInitializationEvent event) {
// 		NetworkRegistry.INSTANCE.registerGuiHandler(Nutrition.instance, new ModGuiHandler()); // Register GUI handler
// 
// 		Nutrition.proxy.init(event);
// 	}
// 
// 	@EventHandler
// 	public void postInit(FMLPostInitializationEvent event) {
// 		DataImporter.reload(); // Load nutrients and effects
// 
// 		Nutrition.proxy.postInit(event);
// 	}
// 
// 	@Mod.EventHandler
// 	public void serverStart(FMLServerStartingEvent event) {
// 		event.registerServerCommand(new ChatCommand());
// 	}
// }
// 
// Path: src/main/java/ca/wescook/nutrition/gui/ModGuiHandler.java
// public class ModGuiHandler implements IGuiHandler {
// 	// GUI IDs
// 	public static final int NUTRITION_GUI_ID = 0;
// 	public static NutritionGui nutritionGui;
// 
// 	@Override
// 	public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
// 		return null;
// 	}
// 
// 	@Override
// 	public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
// 		if (ID == NUTRITION_GUI_ID)
// 			return nutritionGui = new NutritionGui();
// 		return null;
// 	}
// }
// 
// Path: src/main/java/ca/wescook/nutrition/proxy/ClientProxy.java
// public class ClientProxy implements IProxy {
// 	public static INutrientManager localNutrition; // Holds local copy of data/methods for client-side prediction
// 	public static KeyBinding keyNutritionGui;
// 
// 	@Override
// 	public void preInit(FMLPreInitializationEvent event) {
// 	}
// 
// 	@Override
// 	public void init(FMLInitializationEvent event) {
// 
// 		if (Config.enableGui) { // If GUI is enabled
// 			ClientRegistry.registerKeyBinding(keyNutritionGui = new KeyBinding("key.nutrition", 49, "Nutrition")); // Register Nutrition keybind, default to "N"
// 			MinecraftForge.EVENT_BUS.register(new EventNutritionKey()); // Register key input event to respond to keybind
// 			if (Config.enableGuiButton)
// 				MinecraftForge.EVENT_BUS.register(new EventNutritionButton()); // Register GUI button event
// 		}
// 
// 		if (Config.enableTooltips)
// 			MinecraftForge.EVENT_BUS.register(new EventTooltip()); // Register tooltip event
// 	}
// 
// 	@Override
// 	public void postInit(FMLPostInitializationEvent event) {
// 	}
// }


import ca.wescook.nutrition.Nutrition;
import ca.wescook.nutrition.gui.ModGuiHandler;
import ca.wescook.nutrition.proxy.ClientProxy;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.input.Keyboard;
package ca.wescook.nutrition.events;


public class EventNutritionKey {
	@SubscribeEvent
	@SideOnly(Side.CLIENT)
	public void keyInput(InputEvent.KeyInputEvent event) {
		// Exit on key de-press
		if (!Keyboard.getEventKeyState()) {
			return;
		}

		// If Nutrition key is pressed, and F3 key is not being held (F3+N toggles Spectator mode)
		if (ClientProxy.keyNutritionGui.isKeyDown() && !Keyboard.isKeyDown(Keyboard.KEY_F3)) {
// Path: src/main/java/ca/wescook/nutrition/Nutrition.java
// @Mod(
// 	modid = MODID,
// 	name = MODNAME,
// 	version = "@VERSION@",
// 	acceptedMinecraftVersions = FORGE_VERSIONS,
// 	acceptableRemoteVersions = "*"
// )
// 
// public class Nutrition {
// 	public static final String MODID = "nutrition";
// 	public static final String MODNAME = "Nutrition";
// 	public static final String FORGE_VERSIONS = "[1.12,1.13)";
// 
// 	// Create instance of mod
// 	@Mod.Instance
// 	public static Nutrition instance;
// 
// 	// Create instance of proxy
// 	// This will vary depending on if the client or server is running
// 	@SidedProxy(
// 		clientSide="ca.wescook.nutrition.proxy.ClientProxy",
// 		serverSide="ca.wescook.nutrition.proxy.ServerProxy"
// 	)
// 	public static IProxy proxy;
// 
// 	// Events
// 	@EventHandler
// 	public void preInit(FMLPreInitializationEvent event) {
// 		Config.registerConfigs(event.getModConfigurationDirectory()); // Load Config file
// 		ModPacketHandler.registerMessages(); // Register network messages
// 		CapabilityManager.register(); // Register capability
// 
// 		ModPotions.createPotions(); // Register custom potions
// 		MinecraftForge.EVENT_BUS.register(new EventRegistry()); // Register custom potions
// 		MinecraftForge.EVENT_BUS.register(new EventPlayerJoinWorld()); // Attach capability to player
// 		MinecraftForge.EVENT_BUS.register(new EventPlayerDeath()); // Player death and warping
// 		MinecraftForge.EVENT_BUS.register(new EventEatFood()); // Register use item event
// 		MinecraftForge.EVENT_BUS.register(new EventWorldTick()); // Register update event for nutrition decay and potion effects
// 
// 		Nutrition.proxy.preInit(event);
// 	}
// 
// 	@EventHandler
// 	public void init(FMLInitializationEvent event) {
// 		NetworkRegistry.INSTANCE.registerGuiHandler(Nutrition.instance, new ModGuiHandler()); // Register GUI handler
// 
// 		Nutrition.proxy.init(event);
// 	}
// 
// 	@EventHandler
// 	public void postInit(FMLPostInitializationEvent event) {
// 		DataImporter.reload(); // Load nutrients and effects
// 
// 		Nutrition.proxy.postInit(event);
// 	}
// 
// 	@Mod.EventHandler
// 	public void serverStart(FMLServerStartingEvent event) {
// 		event.registerServerCommand(new ChatCommand());
// 	}
// }
// 
// Path: src/main/java/ca/wescook/nutrition/gui/ModGuiHandler.java
// public class ModGuiHandler implements IGuiHandler {
// 	// GUI IDs
// 	public static final int NUTRITION_GUI_ID = 0;
// 	public static NutritionGui nutritionGui;
// 
// 	@Override
// 	public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
// 		return null;
// 	}
// 
// 	@Override
// 	public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
// 		if (ID == NUTRITION_GUI_ID)
// 			return nutritionGui = new NutritionGui();
// 		return null;
// 	}
// }
// 
// Path: src/main/java/ca/wescook/nutrition/proxy/ClientProxy.java
// public class ClientProxy implements IProxy {
// 	public static INutrientManager localNutrition; // Holds local copy of data/methods for client-side prediction
// 	public static KeyBinding keyNutritionGui;
// 
// 	@Override
// 	public void preInit(FMLPreInitializationEvent event) {
// 	}
// 
// 	@Override
// 	public void init(FMLInitializationEvent event) {
// 
// 		if (Config.enableGui) { // If GUI is enabled
// 			ClientRegistry.registerKeyBinding(keyNutritionGui = new KeyBinding("key.nutrition", 49, "Nutrition")); // Register Nutrition keybind, default to "N"
// 			MinecraftForge.EVENT_BUS.register(new EventNutritionKey()); // Register key input event to respond to keybind
// 			if (Config.enableGuiButton)
// 				MinecraftForge.EVENT_BUS.register(new EventNutritionButton()); // Register GUI button event
// 		}
// 
// 		if (Config.enableTooltips)
// 			MinecraftForge.EVENT_BUS.register(new EventTooltip()); // Register tooltip event
// 	}
// 
// 	@Override
// 	public void postInit(FMLPostInitializationEvent event) {
// 	}
// }


// Path: src/main/java/ca/wescook/nutrition/events/EventNutritionKey.java
import ca.wescook.nutrition.Nutrition;
import ca.wescook.nutrition.gui.ModGuiHandler;
import ca.wescook.nutrition.proxy.ClientProxy;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.input.Keyboard;

package ca.wescook.nutrition.events;


public class EventNutritionKey {
	@SubscribeEvent
	@SideOnly(Side.CLIENT)
	public void keyInput(InputEvent.KeyInputEvent event) {
		// Exit on key de-press
		if (!Keyboard.getEventKeyState()) {
			return;
		}

		// If Nutrition key is pressed, and F3 key is not being held (F3+N toggles Spectator mode)
		if (ClientProxy.keyNutritionGui.isKeyDown() && !Keyboard.isKeyDown(Keyboard.KEY_F3)) {
			openNutritionGui();