// Path: src/api/java/bluedart/api/IBreakable.java
// public abstract interface IBreakable {
// }
// 
// Path: src/main/java/portablejim/veinminer/api/IMCMessage.java
// @SuppressWarnings("UnusedDeclaration")
// public class IMCMessage {
//     public static void addTool(String type, String itemName) {
//         sendWhitelistMessage("item", type, itemName);
//     }
// 
//     public static void addBlock(String type, String blockName) {
//         sendWhitelistMessage("block", type, blockName);
//     }
// 
//     private static void sendWhitelistMessage(String itemType, String toolType, String blockName) {
//         NBTTagCompound message = new NBTTagCompound();
//         message.setString("whitelistType", itemType);
//         message.setString("toolType", toolType);
//         message.setString("blockName", blockName);
//         FMLInterModComms.sendMessage("VeinMiner", "whitelist", message);
//     }
// 
//     public static void addToolType(String type, String name, String icon) {
//         NBTTagCompound message = new NBTTagCompound();
//         message.setString("toolType", type);
//         message.setString("toolName", name);
//         message.setString("toolIcon", icon);
//         FMLInterModComms.sendMessage("VeinMiner", "addTool", message);
//     }
// 
//     public static void addBlockEquivalence(String existingBlock, String newBlock) {
//         NBTTagCompound message = new NBTTagCompound();
//         message.setString("existingBlock", existingBlock);
//         message.setString("newBlock", newBlock);
//         FMLInterModComms.sendMessage("VeinMiner", "addEqualBlocks", message);
//     }
// }
// 
// Path: src/main/java/portablejim/veinminer/api/Permission.java
// public enum Permission {
//     FORCE_ALLOW,
//     ALLOW,
//     DENY,
//     FORCE_DENY;
// 
//     public boolean isAllowed() {
//         return this == ALLOW || this == FORCE_ALLOW;
//     }
// 
//     public boolean isDenied() {
//         return this == DENY || this == FORCE_DENY;
//     }
// }
// 
// Path: src/main/java/portablejim/veinminer/api/VeinminerHarvestFailedCheck.java
// public class VeinminerHarvestFailedCheck extends Event {
//     public Permission allowContinue;
//     public final EntityPlayerMP player;
//     public final String blockName;
//     public final int blockMetadata;
//     public final Point blockPoint;
// 
//     public VeinminerHarvestFailedCheck(EntityPlayerMP player, Point blockPoint, String name, int metadata) {
//         this.blockPoint = blockPoint;
//         allowContinue = Permission.DENY;
//         this.player = player;
//         this.blockName = name;
//         this.blockMetadata = metadata;
//     }
// }
// 
// Path: src/main/java/portablejim/veinminer/api/VeinminerPostUseTool.java
// public class VeinminerPostUseTool extends Event {
//     public final EntityPlayerMP player;
//     public final Point blockPos;
// 
//     public VeinminerPostUseTool(EntityPlayerMP player, Point blockPos) {
//         this.player = player;
//         this.blockPos = blockPos;
//     }
// }


import bluedart.api.IBreakable;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.network.NetworkCheckHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.common.config.Configuration;
import portablejim.veinminer.api.IMCMessage;
import portablejim.veinminer.api.Permission;
import portablejim.veinminer.api.VeinminerHarvestFailedCheck;
import portablejim.veinminer.api.VeinminerPostUseTool;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import static net.minecraftforge.fml.common.Mod.EventHandler;
import static net.minecraftforge.fml.common.Mod.Instance;
        if(block == null) {
            devLog("ERROR: Block id wrong.");
            return;
        }

        /*if(toolTags.hasKey("Broken")) {
            devLog("DENY: Tool broken");
            if(event.allowContinue == Permission.ALLOW) {
                event.allowContinue = Permission.DENY;
            }
            return;
        }*/

        devLog("Allowing event");
        if(event.allowContinue == Permission.DENY) {
            event.allowContinue = Permission.ALLOW;
        }
    }

    @SuppressWarnings("UnusedDeclaration")
    @SubscribeEvent
    public void fixFalseNegatives(VeinminerHarvestFailedCheck event) {
        // Some blocks return false when they shouldn't.
        if(event.allowContinue == Permission.DENY) {
            if("IC2:blockRubWood".equals(event.blockName)) event.allowContinue = Permission.ALLOW;
        }
    }

    @SuppressWarnings("UnusedDeclaration")
    @SubscribeEvent
// Path: src/api/java/bluedart/api/IBreakable.java
// public abstract interface IBreakable {
// }
// 
// Path: src/main/java/portablejim/veinminer/api/IMCMessage.java
// @SuppressWarnings("UnusedDeclaration")
// public class IMCMessage {
//     public static void addTool(String type, String itemName) {
//         sendWhitelistMessage("item", type, itemName);
//     }
// 
//     public static void addBlock(String type, String blockName) {
//         sendWhitelistMessage("block", type, blockName);
//     }
// 
//     private static void sendWhitelistMessage(String itemType, String toolType, String blockName) {
//         NBTTagCompound message = new NBTTagCompound();
//         message.setString("whitelistType", itemType);
//         message.setString("toolType", toolType);
//         message.setString("blockName", blockName);
//         FMLInterModComms.sendMessage("VeinMiner", "whitelist", message);
//     }
// 
//     public static void addToolType(String type, String name, String icon) {
//         NBTTagCompound message = new NBTTagCompound();
//         message.setString("toolType", type);
//         message.setString("toolName", name);
//         message.setString("toolIcon", icon);
//         FMLInterModComms.sendMessage("VeinMiner", "addTool", message);
//     }
// 
//     public static void addBlockEquivalence(String existingBlock, String newBlock) {
//         NBTTagCompound message = new NBTTagCompound();
//         message.setString("existingBlock", existingBlock);
//         message.setString("newBlock", newBlock);
//         FMLInterModComms.sendMessage("VeinMiner", "addEqualBlocks", message);
//     }
// }
// 
// Path: src/main/java/portablejim/veinminer/api/Permission.java
// public enum Permission {
//     FORCE_ALLOW,
//     ALLOW,
//     DENY,
//     FORCE_DENY;
// 
//     public boolean isAllowed() {
//         return this == ALLOW || this == FORCE_ALLOW;
//     }
// 
//     public boolean isDenied() {
//         return this == DENY || this == FORCE_DENY;
//     }
// }
// 
// Path: src/main/java/portablejim/veinminer/api/VeinminerHarvestFailedCheck.java
// public class VeinminerHarvestFailedCheck extends Event {
//     public Permission allowContinue;
//     public final EntityPlayerMP player;
//     public final String blockName;
//     public final int blockMetadata;
//     public final Point blockPoint;
// 
//     public VeinminerHarvestFailedCheck(EntityPlayerMP player, Point blockPoint, String name, int metadata) {
//         this.blockPoint = blockPoint;
//         allowContinue = Permission.DENY;
//         this.player = player;
//         this.blockName = name;
//         this.blockMetadata = metadata;
//     }
// }
// 
// Path: src/main/java/portablejim/veinminer/api/VeinminerPostUseTool.java
// public class VeinminerPostUseTool extends Event {
//     public final EntityPlayerMP player;
//     public final Point blockPos;
// 
//     public VeinminerPostUseTool(EntityPlayerMP player, Point blockPos) {
//         this.player = player;
//         this.blockPos = blockPos;
//     }
// }


// Path: src/main/java/portablejim/veinminermodsupport/VeinMinerModSupport.java
import bluedart.api.IBreakable;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.network.NetworkCheckHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.common.config.Configuration;
import portablejim.veinminer.api.IMCMessage;
import portablejim.veinminer.api.Permission;
import portablejim.veinminer.api.VeinminerHarvestFailedCheck;
import portablejim.veinminer.api.VeinminerPostUseTool;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import static net.minecraftforge.fml.common.Mod.EventHandler;
import static net.minecraftforge.fml.common.Mod.Instance;

        if(block == null) {
            devLog("ERROR: Block id wrong.");
            return;
        }

        /*if(toolTags.hasKey("Broken")) {
            devLog("DENY: Tool broken");
            if(event.allowContinue == Permission.ALLOW) {
                event.allowContinue = Permission.DENY;
            }
            return;
        }*/

        devLog("Allowing event");
        if(event.allowContinue == Permission.DENY) {
            event.allowContinue = Permission.ALLOW;
        }
    }

    @SuppressWarnings("UnusedDeclaration")
    @SubscribeEvent
    public void fixFalseNegatives(VeinminerHarvestFailedCheck event) {
        // Some blocks return false when they shouldn't.
        if(event.allowContinue == Permission.DENY) {
            if("IC2:blockRubWood".equals(event.blockName)) event.allowContinue = Permission.ALLOW;
        }
    }

    @SuppressWarnings("UnusedDeclaration")
    @SubscribeEvent
    public void applyForce(VeinminerPostUseTool event) {