// Path: src/main/java/crazypants/enderzoo/EnderZoo.java
// @Mod(modid = MODID, name = MOD_NAME, version = VERSION, guiFactory = "crazypants.enderzoo.config.ConfigFactoryEnderZoo")
// public class EnderZoo {
// 
//   public static final String MODID = "enderzoo";
//   public static final String MOD_NAME = "Ender Zoo";
//   public static final String VERSION = "@VERSION@";
// 
//   @Instance(MODID)
//   public static EnderZoo instance;
// 
//   @SidedProxy(clientSide = "crazypants.enderzoo.ClientProxy", serverSide = "crazypants.enderzoo.CommonProxy")
//   public static CommonProxy proxy;
// 
//   public static ItemWitheringDust itemWitheringDust;
//   public static ItemConfusingDust itemConfusingDust;
//   public static ItemEnderFragment itemEnderFragment;
//   public static ItemForCreativeMenuIcon itemForCreativeMenuIcon;
//   public static ItemGuardiansBow itemGuardiansBow;
//   public static ItemOwlEgg itemOwlEgg;
// 
//   public static BlockConfusingCharge blockConfusingCharge;
//   public static BlockEnderCharge blockEnderCharge;
//   public static BlockConcussionCharge blockConcussionCharge;
// 
//   public static MobSpawnEventHandler spawnEventHandler;
//   
//   public static Potions potions;
// 
//   @EventHandler
//   public void preInit(FMLPreInitializationEvent event) {
// 	  
// 	MinecraftForge.EVENT_BUS.register(new RegistryHandler());
// 	  
//     itemForCreativeMenuIcon = ItemForCreativeMenuIcon.create();
// 
//     Config.load(event);
//     
//     itemWitheringDust = ItemWitheringDust.create();
//     itemConfusingDust = ItemConfusingDust.create();
//     itemEnderFragment = ItemEnderFragment.create();
//     itemGuardiansBow = ItemGuardiansBow.create();   
//     itemOwlEgg = ItemOwlEgg.create();
// 
//     if (Config.confusingChargeEnabled) {
//       blockConfusingCharge = BlockConfusingCharge.create();
//     }
//     if (Config.enderChargeEnabled) {
//       blockEnderCharge = BlockEnderCharge.create();
//     }
//     if (Config.concussionChargeEnabled) {
//       blockConcussionCharge = BlockConcussionCharge.create();
//     }
//     potions = new Potions();
// 
//     FMLInterModComms.sendMessage("waila", "register", "crazypants.enderzoo.waila.WailaCompat.load");
//     proxy.preInit();
//   }
// 
//   @EventHandler
//   public void load(FMLInitializationEvent event) {
//     instance = this;
//     proxy.init();
//   }
// 
//   @EventHandler
//   public void postInit(FMLPostInitializationEvent event) {
// 
//     MobSpawns.instance.loadSpawnConfig();
// 
//     if (Config.enderZooDifficultyModifierEnabled || Config.globalDifficultyModifierEnabled) {
//       spawnEventHandler = new MobSpawnEventHandler();
//       spawnEventHandler.init();
//     }
// 
//   }
// 
//   protected static void addRecipes() {
//     OreDictionary.registerOre("sand", new ItemStack(Blocks.SAND, 1, OreDictionary.WILDCARD_VALUE));
//     if (Config.confusingChargeEnabled) {      
//       ItemStack cc = new ItemStack(blockConfusingCharge);
//       GameRegistry.addShapedRecipe(blockConfusingCharge.getRegistryName(), null, cc, "csc", "sgs", "csc", 'c', itemConfusingDust, 's', "sand", 'g', Items.GUNPOWDER);
//     }
//     if (Config.enderChargeEnabled) {      
//       ItemStack cc = new ItemStack(blockEnderCharge);
//       GameRegistry.addShapedRecipe(blockEnderCharge.getRegistryName(), null, cc, "csc", "sgs", "csc", 'c', itemEnderFragment, 's', "sand", 'g', Items.GUNPOWDER);
//     }
//     if (Config.concussionChargeEnabled) {      
//       ItemStack cc = new ItemStack(blockConcussionCharge);
//       GameRegistry.addShapedRecipe(blockConcussionCharge.getRegistryName(), null, cc, "eee", "sgs", "ccc", 'c', itemConfusingDust, 'e', itemEnderFragment, 's', "sand", 'g', Items.GUNPOWDER);
//     }
//     GameRegistry.addShapedRecipe(itemEnderFragment.getRegistryName(), null, new ItemStack(Items.ENDER_PEARL), " f ", "fff", " f ", 'f', itemEnderFragment);   
//   }
// 
// }


import crazypants.enderzoo.EnderZoo;
import net.minecraft.init.Items;
import net.minecraft.init.PotionTypes;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.potion.PotionEffect;
import net.minecraft.potion.PotionUtils;
    return res;     
  }

  public static ItemStack createHealthPotion(boolean isProlonged, boolean isAugmented, boolean isSplash) {
    ItemStack res = getEmptyPotion(isSplash);
    if(isProlonged || isAugmented) {
      PotionUtils.addPotionToItemStack(res, PotionTypes.STRONG_HEALING);
    } else {
      PotionUtils.addPotionToItemStack(res, PotionTypes.HEALING);
    }
    return res;
  }

  public static ItemStack createRegenerationPotion(boolean isProlonged, boolean isAugmented, boolean isSplash) {
    ItemStack res = getEmptyPotion(isSplash);
    if(isAugmented) {
      PotionUtils.addPotionToItemStack(res, PotionTypes.STRONG_REGENERATION);
    } else if(isProlonged) {
      PotionUtils.addPotionToItemStack(res, PotionTypes.LONG_REGENERATION);
    } else {
      PotionUtils.addPotionToItemStack(res, PotionTypes.REGENERATION);
    }
    return res;
  }

  public static void writeCustomEffectToNBT(PotionEffect effect, ItemStack stack) {
    NBTTagCompound nbt;
    if(stack.hasTagCompound()) {
      nbt = stack.getTagCompound();
    } else {
// Path: src/main/java/crazypants/enderzoo/EnderZoo.java
// @Mod(modid = MODID, name = MOD_NAME, version = VERSION, guiFactory = "crazypants.enderzoo.config.ConfigFactoryEnderZoo")
// public class EnderZoo {
// 
//   public static final String MODID = "enderzoo";
//   public static final String MOD_NAME = "Ender Zoo";
//   public static final String VERSION = "@VERSION@";
// 
//   @Instance(MODID)
//   public static EnderZoo instance;
// 
//   @SidedProxy(clientSide = "crazypants.enderzoo.ClientProxy", serverSide = "crazypants.enderzoo.CommonProxy")
//   public static CommonProxy proxy;
// 
//   public static ItemWitheringDust itemWitheringDust;
//   public static ItemConfusingDust itemConfusingDust;
//   public static ItemEnderFragment itemEnderFragment;
//   public static ItemForCreativeMenuIcon itemForCreativeMenuIcon;
//   public static ItemGuardiansBow itemGuardiansBow;
//   public static ItemOwlEgg itemOwlEgg;
// 
//   public static BlockConfusingCharge blockConfusingCharge;
//   public static BlockEnderCharge blockEnderCharge;
//   public static BlockConcussionCharge blockConcussionCharge;
// 
//   public static MobSpawnEventHandler spawnEventHandler;
//   
//   public static Potions potions;
// 
//   @EventHandler
//   public void preInit(FMLPreInitializationEvent event) {
// 	  
// 	MinecraftForge.EVENT_BUS.register(new RegistryHandler());
// 	  
//     itemForCreativeMenuIcon = ItemForCreativeMenuIcon.create();
// 
//     Config.load(event);
//     
//     itemWitheringDust = ItemWitheringDust.create();
//     itemConfusingDust = ItemConfusingDust.create();
//     itemEnderFragment = ItemEnderFragment.create();
//     itemGuardiansBow = ItemGuardiansBow.create();   
//     itemOwlEgg = ItemOwlEgg.create();
// 
//     if (Config.confusingChargeEnabled) {
//       blockConfusingCharge = BlockConfusingCharge.create();
//     }
//     if (Config.enderChargeEnabled) {
//       blockEnderCharge = BlockEnderCharge.create();
//     }
//     if (Config.concussionChargeEnabled) {
//       blockConcussionCharge = BlockConcussionCharge.create();
//     }
//     potions = new Potions();
// 
//     FMLInterModComms.sendMessage("waila", "register", "crazypants.enderzoo.waila.WailaCompat.load");
//     proxy.preInit();
//   }
// 
//   @EventHandler
//   public void load(FMLInitializationEvent event) {
//     instance = this;
//     proxy.init();
//   }
// 
//   @EventHandler
//   public void postInit(FMLPostInitializationEvent event) {
// 
//     MobSpawns.instance.loadSpawnConfig();
// 
//     if (Config.enderZooDifficultyModifierEnabled || Config.globalDifficultyModifierEnabled) {
//       spawnEventHandler = new MobSpawnEventHandler();
//       spawnEventHandler.init();
//     }
// 
//   }
// 
//   protected static void addRecipes() {
//     OreDictionary.registerOre("sand", new ItemStack(Blocks.SAND, 1, OreDictionary.WILDCARD_VALUE));
//     if (Config.confusingChargeEnabled) {      
//       ItemStack cc = new ItemStack(blockConfusingCharge);
//       GameRegistry.addShapedRecipe(blockConfusingCharge.getRegistryName(), null, cc, "csc", "sgs", "csc", 'c', itemConfusingDust, 's', "sand", 'g', Items.GUNPOWDER);
//     }
//     if (Config.enderChargeEnabled) {      
//       ItemStack cc = new ItemStack(blockEnderCharge);
//       GameRegistry.addShapedRecipe(blockEnderCharge.getRegistryName(), null, cc, "csc", "sgs", "csc", 'c', itemEnderFragment, 's', "sand", 'g', Items.GUNPOWDER);
//     }
//     if (Config.concussionChargeEnabled) {      
//       ItemStack cc = new ItemStack(blockConcussionCharge);
//       GameRegistry.addShapedRecipe(blockConcussionCharge.getRegistryName(), null, cc, "eee", "sgs", "ccc", 'c', itemConfusingDust, 'e', itemEnderFragment, 's', "sand", 'g', Items.GUNPOWDER);
//     }
//     GameRegistry.addShapedRecipe(itemEnderFragment.getRegistryName(), null, new ItemStack(Items.ENDER_PEARL), " f ", "fff", " f ", 'f', itemEnderFragment);   
//   }
// 
// }


// Path: src/main/java/crazypants/enderzoo/potion/BrewingUtil.java
import crazypants.enderzoo.EnderZoo;
import net.minecraft.init.Items;
import net.minecraft.init.PotionTypes;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.potion.PotionEffect;
import net.minecraft.potion.PotionUtils;

    return res;     
  }

  public static ItemStack createHealthPotion(boolean isProlonged, boolean isAugmented, boolean isSplash) {
    ItemStack res = getEmptyPotion(isSplash);
    if(isProlonged || isAugmented) {
      PotionUtils.addPotionToItemStack(res, PotionTypes.STRONG_HEALING);
    } else {
      PotionUtils.addPotionToItemStack(res, PotionTypes.HEALING);
    }
    return res;
  }

  public static ItemStack createRegenerationPotion(boolean isProlonged, boolean isAugmented, boolean isSplash) {
    ItemStack res = getEmptyPotion(isSplash);
    if(isAugmented) {
      PotionUtils.addPotionToItemStack(res, PotionTypes.STRONG_REGENERATION);
    } else if(isProlonged) {
      PotionUtils.addPotionToItemStack(res, PotionTypes.LONG_REGENERATION);
    } else {
      PotionUtils.addPotionToItemStack(res, PotionTypes.REGENERATION);
    }
    return res;
  }

  public static void writeCustomEffectToNBT(PotionEffect effect, ItemStack stack) {
    NBTTagCompound nbt;
    if(stack.hasTagCompound()) {
      nbt = stack.getTagCompound();
    } else {
      nbt = new NBTTagCompound();