// Path: src/main/java/eureka/Eureka.java
// @Mod(modid = "eureka", name = "Eureka", version = "@MODVERSION@", acceptedMinecraftVersions = "1.7.10")
// public class Eureka {
// 
// 	@Mod.Instance("eureka")
// 	public static Eureka instance;
// 
// 	@SidedProxy(clientSide = "eureka.proxy.ClientProxy", serverSide = "eureka.proxy.ServerProxy")
// 	public static IProxy proxy;
// 	public static ItemEngineeringDiary engineeringDiary;
// 	public static CreativeTabs eureka = new CreativeTabs("Eureka") {
// 
// 		@Override
// 		public Item getTabIconItem() {
// 			return engineeringDiary;
// 		}
// 
// 	};
// 
// 	public static boolean giveBook;
// 
// 	@Mod.EventHandler
// 	public void preInit(FMLPreInitializationEvent event) {
// 		EurekaAPI.API = new EurekaAPIImplementation();
// 		engineeringDiary = new ItemEngineeringDiary();
// 		GameRegistry.registerItem(engineeringDiary, "engineeringDiary");
// 		GameRegistry.addShapelessRecipe(new ItemStack(engineeringDiary), new Object[]{Items.book, Items.iron_ingot});
// 		MinecraftForge.EVENT_BUS.register(new EventHandler());
// 		FMLCommonHandler.instance().bus().register(new EventHandler());
// 		NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
// 		EurekaAPI.API.registerCategory(new BasicEurekaCategory("Eureka", new ItemStack(engineeringDiary)));
// 		PacketHandler.init();
// 		ConfigReader.mainfolder = new File(event.getModConfigurationDirectory(), "Eureka");
// 		ConfigReader.read();
// 		Configuration config = new Configuration(event.getSuggestedConfigurationFile());
// 		giveBook = config.get("General", "giveBook", true).setDefaultValue(true).getBoolean();
// 		config.save();
// 	}
// 
// 	@Mod.EventHandler
// 	public void serverStart(FMLServerStartingEvent event) {
// 		event.registerServerCommand(new EurekaCommand());
// 	}
// 
// }
// 
// Path: src/main/java/eureka/api/EnumProgressOptions.java
// public enum EnumProgressOptions {
// 	CRAFTING(true),
// 	CRAFT_ANYTHING(false),
// 	BREAK_BLOCK(true),
// 	BREAK_ANY_BLOCK(false),
// 	PLACE_BLOCK(true),
// 	PLACE_ANY_BLOCK(false),
// 	ENDER_TELEPORT(false),
// 	KILL_ANYTHING(false),
// 	DIE(false),
// 	FILL_BUCKET(false);
// 
// 	private final boolean hasArg;
// 
// 	EnumProgressOptions(boolean hasArg) {
// 		this.hasArg = hasArg;
// 	}
// 
// 	public boolean hasArg() {
// 		return hasArg;
// 	}
// }
// 
// Path: src/main/java/eureka/api/EurekaAPI.java
// public class EurekaAPI {
// 
// 	public static IEurekAPI API;
// }


import java.util.List;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.event.entity.EntityEvent;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import net.minecraftforge.event.entity.player.FillBucketEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.world.BlockEvent;
import eureka.Eureka;
import eureka.api.EnumProgressOptions;
import eureka.api.EurekaAPI;
package eureka.core;





/**
 * Copyright (c) 2014-2015, AEnterprise
 * http://buildcraftadditions.wordpress.com/
 * Eureka is distributed under the terms of GNU GPL v3.0
 * Please check the contents of the license located in
 * http://buildcraftadditions.wordpress.com/wiki/licensing-stuff/
 */
public class EventHandler {

	@SubscribeEvent
	public void onEntityConstruction(EntityEvent.EntityConstructing event) {
		if (event.entity instanceof EntityPlayer && PlayerResearch.get((EntityPlayer) event.entity) == null) {
			PlayerResearch.register((EntityPlayer) event.entity);
		}
	}

	@SubscribeEvent
	public void onClone(PlayerEvent.Clone event) {
		PlayerResearch.get(event.entityPlayer).copy(PlayerResearch.get(event.original));
	}

	@SubscribeEvent
	public void playerLogin(cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent event) {
		//give engineering diary
// Path: src/main/java/eureka/Eureka.java
// @Mod(modid = "eureka", name = "Eureka", version = "@MODVERSION@", acceptedMinecraftVersions = "1.7.10")
// public class Eureka {
// 
// 	@Mod.Instance("eureka")
// 	public static Eureka instance;
// 
// 	@SidedProxy(clientSide = "eureka.proxy.ClientProxy", serverSide = "eureka.proxy.ServerProxy")
// 	public static IProxy proxy;
// 	public static ItemEngineeringDiary engineeringDiary;
// 	public static CreativeTabs eureka = new CreativeTabs("Eureka") {
// 
// 		@Override
// 		public Item getTabIconItem() {
// 			return engineeringDiary;
// 		}
// 
// 	};
// 
// 	public static boolean giveBook;
// 
// 	@Mod.EventHandler
// 	public void preInit(FMLPreInitializationEvent event) {
// 		EurekaAPI.API = new EurekaAPIImplementation();
// 		engineeringDiary = new ItemEngineeringDiary();
// 		GameRegistry.registerItem(engineeringDiary, "engineeringDiary");
// 		GameRegistry.addShapelessRecipe(new ItemStack(engineeringDiary), new Object[]{Items.book, Items.iron_ingot});
// 		MinecraftForge.EVENT_BUS.register(new EventHandler());
// 		FMLCommonHandler.instance().bus().register(new EventHandler());
// 		NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
// 		EurekaAPI.API.registerCategory(new BasicEurekaCategory("Eureka", new ItemStack(engineeringDiary)));
// 		PacketHandler.init();
// 		ConfigReader.mainfolder = new File(event.getModConfigurationDirectory(), "Eureka");
// 		ConfigReader.read();
// 		Configuration config = new Configuration(event.getSuggestedConfigurationFile());
// 		giveBook = config.get("General", "giveBook", true).setDefaultValue(true).getBoolean();
// 		config.save();
// 	}
// 
// 	@Mod.EventHandler
// 	public void serverStart(FMLServerStartingEvent event) {
// 		event.registerServerCommand(new EurekaCommand());
// 	}
// 
// }
// 
// Path: src/main/java/eureka/api/EnumProgressOptions.java
// public enum EnumProgressOptions {
// 	CRAFTING(true),
// 	CRAFT_ANYTHING(false),
// 	BREAK_BLOCK(true),
// 	BREAK_ANY_BLOCK(false),
// 	PLACE_BLOCK(true),
// 	PLACE_ANY_BLOCK(false),
// 	ENDER_TELEPORT(false),
// 	KILL_ANYTHING(false),
// 	DIE(false),
// 	FILL_BUCKET(false);
// 
// 	private final boolean hasArg;
// 
// 	EnumProgressOptions(boolean hasArg) {
// 		this.hasArg = hasArg;
// 	}
// 
// 	public boolean hasArg() {
// 		return hasArg;
// 	}
// }
// 
// Path: src/main/java/eureka/api/EurekaAPI.java
// public class EurekaAPI {
// 
// 	public static IEurekAPI API;
// }


// Path: src/main/java/eureka/core/EventHandler.java
import java.util.List;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.event.entity.EntityEvent;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import net.minecraftforge.event.entity.player.FillBucketEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.world.BlockEvent;
import eureka.Eureka;
import eureka.api.EnumProgressOptions;
import eureka.api.EurekaAPI;

package eureka.core;





/**
 * Copyright (c) 2014-2015, AEnterprise
 * http://buildcraftadditions.wordpress.com/
 * Eureka is distributed under the terms of GNU GPL v3.0
 * Please check the contents of the license located in
 * http://buildcraftadditions.wordpress.com/wiki/licensing-stuff/
 */
public class EventHandler {

	@SubscribeEvent
	public void onEntityConstruction(EntityEvent.EntityConstructing event) {
		if (event.entity instanceof EntityPlayer && PlayerResearch.get((EntityPlayer) event.entity) == null) {
			PlayerResearch.register((EntityPlayer) event.entity);
		}
	}

	@SubscribeEvent
	public void onClone(PlayerEvent.Clone event) {
		PlayerResearch.get(event.entityPlayer).copy(PlayerResearch.get(event.original));
	}

	@SubscribeEvent
	public void playerLogin(cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent event) {
		//give engineering diary
		if (!event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).hasKey("bookRecieved") && Eureka.giveBook) {