@Override
  public float generateNoise(
      PerlinNoise perlin, CellNoise cell, int x, int y, float ocean, float border, float river) {
    float st = (perlin.noise2(x / 160f, y / 160f) + 0.38f) * 35f * river;
    st = st < 0.2f ? 0.2f : st;

    float h = perlin.noise2(x / 60f, y / 60f) * st * 2f;
    h = h > 0f ? -h : h;
    h += st;
    h *= h / 50f;
    h += st;

    return 70f + h;
  }
  @Override
  public void paintTerrain(
      Block[] blocks,
      byte[] metadata,
      int i,
      int j,
      int x,
      int y,
      int depth,
      World world,
      Random rand,
      PerlinNoise perlin,
      CellNoise cell,
      float[] noise,
      float river,
      BiomeGenBase[] base) {
    float c = CliffCalculator.calc(x, y, noise);
    boolean cliff = c > 1.3f ? true : false;
    boolean dirt = false;

    for (int k = 255; k > -1; k--) {
      Block b = blocks[(y * 16 + x) * 256 + k];
      if (b == Blocks.air) {
        depth = -1;
      } else if (b == Blocks.stone) {
        depth++;

        if (cliff) {
          if (cliffType == 1) {
            if (depth < 6) {
              blocks[(y * 16 + x) * 256 + k] = cliffBlock1;
              metadata[(y * 16 + x) * 256 + k] = 14;
            }
          } else {
            if (depth > -1 && depth < 2) {
              blocks[(y * 16 + x) * 256 + k] = rand.nextInt(3) == 0 ? cliffBlock2 : cliffBlock1;
            } else if (depth < 10) {
              blocks[(y * 16 + x) * 256 + k] = cliffBlock1;
            }
          }
        } else if (depth < 6) {
          if (depth == 0 && k > 61) {
            if (perlin.noise2(i / 12f, j / 12f) > -0.3f + ((k - 61f) / 15f)) {
              dirt = true;
              blocks[(y * 16 + x) * 256 + k] = topBlock;
            } else {
              blocks[(y * 16 + x) * 256 + k] = Blocks.sand;
              metadata[(y * 16 + x) * 256 + k] = sandMetadata;
            }
          } else if (depth < 4) {
            if (dirt) {
              blocks[(y * 16 + x) * 256 + k] = fillerBlock;
            } else {
              blocks[(y * 16 + x) * 256 + k] = Blocks.sand;
              metadata[(y * 16 + x) * 256 + k] = sandMetadata;
            }
          } else if (!dirt) {
            blocks[(y * 16 + x) * 256 + k] = Blocks.sandstone;
          }
        }
      }
    }
  }