public int amplifyEffect(EntityPlayer player, Potion potion) {
    PotionEffect eff = player.getActivePotionEffect(potion);
    if (eff != null) {
      int max = 1;
      max = 6;
      int newAmp = eff.getAmplifier();
      int newDur = eff.getDuration();
      if (newAmp < max) {
        newAmp++;
      }
      newDur += 500;
      eff.combine(new PotionEffect(eff.getPotionID(), newDur, newAmp));

      return newAmp;
    }

    player.addPotionEffect(new PotionEffect(potion.id, 300, 0));
    return 1;
  }