public void rDecorateClay(
      World worldObj, Random rand, int chunkX, int chunkZ, float river, int worldX, int worldZ) {
    if (TerrainGen.decorate(worldObj, rand, chunkX, chunkZ, CLAY)) {

      if (river > 0.85f) {

        for (int j2 = 0; j2 < 3; j2++) {

          int l5 = worldX + rand.nextInt(16);
          int i9 = 53 + rand.nextInt(15);
          int l11 = worldZ + rand.nextInt(16);

          (new WorldGenClay(Blocks.clay, 0, clayPerVein)).generate(worldObj, rand, l5, i9, l11);
        }
      }
    }
  }
  @Override
  protected void genDecorations(BiomeGenBase p_150513_1_) {
    MinecraftForge.EVENT_BUS.post(
        new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z));
    this.generateOres();
    int i;
    int j;
    int k;

    boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND);
    for (i = 0; doGen && i < this.sandPerChunk2; ++i) {
      j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      this.sandGen.generate(
          this.currentWorld,
          this.randomGenerator,
          j,
          this.currentWorld.getTopSolidOrLiquidBlock(j, k),
          k);
    }

    doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY);
    for (i = 0; doGen && i < this.clayPerChunk; ++i) {
      j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      this.clayGen.generate(
          this.currentWorld,
          this.randomGenerator,
          j,
          this.currentWorld.getTopSolidOrLiquidBlock(j, k),
          k);
    }

    doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2);
    for (i = 0; doGen && i < this.sandPerChunk; ++i) {
      j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      this.gravelAsSandGen.generate(
          this.currentWorld,
          this.randomGenerator,
          j,
          this.currentWorld.getTopSolidOrLiquidBlock(j, k),
          k);
    }

    i = this.treesPerChunk;

    if (this.randomGenerator.nextInt(10) == 0) {
      ++i;
    }

    int l;
    int i1;

    for (j = 0; j < i; ++j) {
      k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;

      for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);
          i1 > 0 && this.currentWorld.isAirBlock(k, i1 - 1, l);
          --i1) {;
      }

      // if(randomGenerator.nextInt() == 0) {
      WorldGenTrees worldGenTree = new WorldGenTrees(false, 6, 0, 0, true);
      worldGenTree.setScale(1.0D, 1.0D, 1.0D);

      worldGenTree.generate(this.currentWorld, this.randomGenerator, k, i1, l);
      /*} else {
          treeGen.generate(this.currentWorld, this.randomGenerator, k, i1, l);
      }*/
    }

    /*
     * doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X,
     * chunk_Z, TREE); for (j = 0; doGen && j < i; ++j) { k = this.chunk_X +
     * this.randomGenerator.nextInt(16) + 8; l = this.chunk_Z +
     * this.randomGenerator.nextInt(16) + 8; i1 =
     * this.currentWorld.getHeightValue(k, l); WorldGenAbstractTree
     * worldgenabstracttree =
     * p_150513_1_.func_150567_a(this.randomGenerator);
     * worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D);
     *
     * if (worldgenabstracttree.generate(this.currentWorld,
     * this.randomGenerator, k, i1, l)) {
     * worldgenabstracttree.func_150524_b(this.currentWorld,
     * this.randomGenerator, k, i1, l); } }
     */

    /*
     * doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X,
     * chunk_Z, BIG_SHROOM); for (j = 0; doGen && j <
     * this.bigMushroomsPerChunk; ++j) { k = this.chunk_X +
     * this.randomGenerator.nextInt(16) + 8; l = this.chunk_Z +
     * this.randomGenerator.nextInt(16) + 8;
     * this.bigMushroomGen.generate(this.currentWorld, this.randomGenerator,
     * k, this.currentWorld.getHeightValue(k, l), l); }
     */

    /*
     * doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X,
     * chunk_Z, FLOWERS); for (j = 0; doGen && j < this.flowersPerChunk;
     * ++j) { k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; l =
     * this.chunk_Z + this.randomGenerator.nextInt(16) + 8; i1 =
     * nextInt(this.currentWorld.getHeightValue(k, l) + 32); String s =
     * p_150513_1_.func_150572_a(this.randomGenerator, k, i1, l);
     * BlockFlower blockflower = BlockFlower.func_149857_e(s);
     *
     * if (blockflower.getMaterial() != Material.air) {
     * this.yellowFlowerGen.func_150550_a(blockflower,
     * BlockFlower.func_149856_f(s));
     * this.yellowFlowerGen.generate(this.currentWorld,
     * this.randomGenerator, k, i1, l); } }
     */

    if (this.randomGenerator.nextInt(4) == 0) {
      k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);
      WorldGenerator worldgenerator = new WorldGenShrub(0, 0);
      worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l);
    }

    doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD);
    for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) {
      k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;

      for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);
          i1 > 0 && this.currentWorld.isAirBlock(k, i1 - 1, l);
          --i1) {;
      }

      this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l);
    }

    doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM);
    for (j = 0; doGen && j < 2; ++j) {
      if (this.randomGenerator.nextInt(4) == 0) {
        k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
        l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
        i1 = this.currentWorld.getHeightValue(k, l);
        this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l);
      }

      if (this.randomGenerator.nextInt(8) == 0) {
        k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
        l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
        i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);
        this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l);
      }
    }

    if (doGen && this.randomGenerator.nextInt(4) == 0) {
      j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      l = nextInt(this.currentWorld.getHeightValue(j, k) * 2);
      this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k);
    }

    if (doGen && this.randomGenerator.nextInt(8) == 0) {
      j = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      l = nextInt(this.currentWorld.getHeightValue(j, k) * 2);
      this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k);
    }

    doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED);
    for (j = 0; doGen && j < this.reedsPerChunk; ++j) {
      k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);
      this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l);
    }

    for (j = 0; doGen && j < 10; ++j) {
      k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);
      this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l);
    }

    /*
     * doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X,
     * chunk_Z, PUMPKIN); if (doGen && this.randomGenerator.nextInt(32) ==
     * 0) { j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; k =
     * this.chunk_Z + this.randomGenerator.nextInt(16) + 8; l =
     * nextInt(this.currentWorld.getHeightValue(j, k) * 2); (new
     * WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator,
     * j, l, k); }
     */

    doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS);
    for (j = 0; doGen && j < this.cactiPerChunk; ++j) {
      k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);
      this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l);
    }

    doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE);
    if (doGen && this.generateLakes) {
      for (j = 0; j < 50; ++j) {
        k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
        l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8);
        i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
        (new WorldGenLiquids(ZombieModpackWorld.finiteWaterSolid))
            .generate(this.currentWorld, this.randomGenerator, k, l, i1);
      }

      for (j = 0; j < 20; ++j) {
        k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
        l =
            this.randomGenerator.nextInt(
                this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8);
        i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
        (new WorldGenLiquids(Blocks.flowing_lava))
            .generate(this.currentWorld, this.randomGenerator, k, l, i1);
      }
    }

    doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS);
    for (j = 0; doGen && j < 10; ++j) {
      k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);

      if (this.randomGenerator.nextInt(4) == 0) {
        new WorldGenGrass().generate(currentWorld, randomGenerator, k, i1, l);
      }
    }

    doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS);
    for (j = 0; doGen && j < 10; ++j) {
      k = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
      l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
      i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2);
      WorldGenerator worldgenerator = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator);
      worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l);
    }

    MinecraftForge.EVENT_BUS.post(
        new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z));
  }
Пример #3
0
  @Override
  public void populate(int chunkX, int chunkZ) {
    BlockFalling.fallInstantly = true;

    int worldX = chunkX * 16;
    int worldZ = chunkZ * 16;
    BlockPos blockPos = new BlockPos(worldX, 0, worldZ);
    Biome biome = worldObj.getBiomeGenForCoords(blockPos.add(16, 0, 16));
    BiomeDecorator decorator = biome.theBiomeDecorator;
    int worldHeight = worldObj.provider.getActualHeight();

    ForgeEventFactory.onChunkPopulate(true, this, worldObj, rand, chunkX, chunkZ, false);

    int x, y, z;

    if (CavelandConfig.generateLakes) {
      if (TerrainGen.populate(this, worldObj, rand, chunkX, chunkZ, false, EventType.LAKE)) {
        x = rand.nextInt(16) + 8;
        y = rand.nextInt(worldHeight - 16);
        z = rand.nextInt(16) + 8;

        lakeWaterGen.generate(worldObj, rand, blockPos.add(x, y, z));
      }

      if (rand.nextInt(30) == 0
          && TerrainGen.populate(this, worldObj, rand, chunkX, chunkZ, false, EventType.LAVA)) {
        x = rand.nextInt(16) + 8;
        y = rand.nextInt(worldHeight / 2);
        z = rand.nextInt(16) + 8;

        lakeLavaGen.generate(worldObj, rand, blockPos.add(x, y, z));
      }
    }

    MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(worldObj, rand, blockPos));

    MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(worldObj, rand, blockPos));

    for (CaveVein vein : CavelandConfig.veinManager.getCaveVeins()) {
      vein.generateVeins(worldObj, rand, blockPos);
    }

    MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Post(worldObj, rand, blockPos));

    for (int i = 0; i < 10; ++i) {
      x = rand.nextInt(16) + 8;
      y = rand.nextInt(worldHeight - 10);
      z = rand.nextInt(16) + 8;

      acresiaGen.generate(worldObj, rand, blockPos.add(x, y, z));
    }

    for (int i = 0; i < 15; ++i) {
      x = rand.nextInt(16) + 8;
      y = rand.nextInt(worldHeight / 2 - 10) + worldHeight / 2;
      z = rand.nextInt(16) + 8;

      acresiaGen.generate(worldObj, rand, blockPos.add(x, y, z));
    }

    if (TerrainGen.decorate(worldObj, rand, blockPos, Decorate.EventType.SHROOM)) {
      for (int i = 0; i < 5; ++i) {
        x = rand.nextInt(16) + 8;
        y = rand.nextInt(worldHeight - 10);
        z = rand.nextInt(16) + 8;

        decorator.mushroomBrownGen.generate(worldObj, rand, blockPos.add(x, y, z));
      }

      for (int i = 0; i < 5; ++i) {
        x = rand.nextInt(16) + 8;
        y = rand.nextInt(worldHeight - 10);
        z = rand.nextInt(16) + 8;

        decorator.mushroomRedGen.generate(worldObj, rand, blockPos.add(x, y, z));
      }
    }

    if (BiomeDictionary.isBiomeOfType(biome, Type.SANDY)) {
      if (TerrainGen.decorate(worldObj, rand, blockPos, Decorate.EventType.CACTUS)) {
        for (int i = 0; i < 80; ++i) {
          x = rand.nextInt(16) + 8;
          y = rand.nextInt(worldHeight - 5);
          z = rand.nextInt(16) + 8;

          decorator.cactusGen.generate(worldObj, rand, blockPos.add(x, y, z));
        }
      }

      if (TerrainGen.decorate(worldObj, rand, blockPos, Decorate.EventType.DEAD_BUSH)) {
        for (int i = 0; i < 10; ++i) {
          x = rand.nextInt(16) + 8;
          y = rand.nextInt(worldHeight - 5);
          z = rand.nextInt(16) + 8;

          deadBushGen.generate(worldObj, rand, blockPos.add(x, y, z));
        }
      }
    } else {
      if (TerrainGen.decorate(worldObj, rand, blockPos, Decorate.EventType.FLOWERS)) {
        for (int i = 0; i < 8; ++i) {
          x = rand.nextInt(16) + 8;
          y = rand.nextInt(worldHeight - 5);
          z = rand.nextInt(16) + 8;

          decorator.yellowFlowerGen.generate(worldObj, rand, blockPos.add(x, y, z));
        }
      }

      for (int i = 0; i < 18; ++i) {
        x = rand.nextInt(16) + 8;
        y = rand.nextInt(worldHeight - 5);
        z = rand.nextInt(16) + 8;

        biome.getRandomWorldGenForGrass(rand).generate(worldObj, rand, blockPos.add(x, y, z));
      }

      if (TerrainGen.decorate(worldObj, rand, blockPos, Decorate.EventType.TREE)) {
        WorldGenAbstractTree treeGen = null;

        if (BiomeDictionary.isBiomeOfType(biome, Type.JUNGLE)) {
          treeGen =
              new WorldGenTreesPerverted(
                  false, 4 + rand.nextInt(7), BlockPlanks.EnumType.JUNGLE, true);
        } else if (BiomeDictionary.isBiomeOfType(biome, Type.FOREST)
            || !BiomeDictionary.isBiomeOfType(biome, Type.PLAINS)
            || rand.nextInt(10) == 0) {
          if (BiomeDictionary.isBiomeOfType(biome, Type.COLD)) {
            treeGen = new WorldGenSpruceTreePerverted(false);
          } else if (rand.nextInt(3) == 0) {
            treeGen = new WorldGenBirchTreePerverted(false, false);
          } else {
            treeGen = new WorldGenTreesPerverted(false, 3, BlockPlanks.EnumType.OAK, true);
          }
        }

        if (treeGen != null) {
          for (int i = 0; i < 80; ++i) {
            x = rand.nextInt(16) + 8;
            y = rand.nextInt(worldHeight);
            z = rand.nextInt(16) + 8;

            BlockPos pos = blockPos.add(x, y, z);

            if (treeGen.generate(worldObj, rand, pos)) {
              treeGen.generateSaplings(worldObj, rand, pos);
            }
          }

          for (int i = 0; i < 60; ++i) {
            x = rand.nextInt(16) + 8;
            y = 8 + rand.nextInt(5);
            z = rand.nextInt(16) + 8;

            BlockPos pos = blockPos.add(x, y, z);

            if (treeGen.generate(worldObj, rand, pos)) {
              treeGen.generateSaplings(worldObj, rand, pos);
            }
          }
        }
      }

      if (decorator.generateLakes) {
        if (BiomeDictionary.isBiomeOfType(biome, Type.WATER)) {
          if (TerrainGen.decorate(worldObj, rand, blockPos, Decorate.EventType.LAKE_WATER)) {
            for (int i = 0; i < 150; ++i) {
              x = rand.nextInt(16) + 8;
              y = rand.nextInt(rand.nextInt(worldHeight - 16) + 10);
              z = rand.nextInt(16) + 8;

              liquidWaterGen.generate(worldObj, rand, blockPos.add(x, y, z));
            }
          }
        } else {
          if (TerrainGen.decorate(worldObj, rand, blockPos, Decorate.EventType.LAKE_WATER)) {
            for (int i = 0; i < 100; ++i) {
              x = rand.nextInt(16) + 8;
              y = rand.nextInt(rand.nextInt(worldHeight - 16) + 10);
              z = rand.nextInt(16) + 8;

              liquidWaterGen.generate(worldObj, rand, blockPos.add(x, y, z));
            }
          }

          if (TerrainGen.decorate(worldObj, rand, blockPos, Decorate.EventType.LAKE_LAVA)) {
            for (int i = 0; i < 20; ++i) {
              x = rand.nextInt(16) + 8;
              y = rand.nextInt(worldHeight / 2);
              z = rand.nextInt(16) + 8;

              liquidLavaGen.generate(worldObj, rand, blockPos.add(x, y, z));
            }
          }
        }
      }
    }

    MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(worldObj, rand, blockPos));

    ForgeEventFactory.onChunkPopulate(false, this, worldObj, rand, chunkX, chunkZ, false);

    BlockFalling.fallInstantly = false;
  }
  @Override
  public void rDecorate(
      World world,
      Random rand,
      int chunkX,
      int chunkY,
      OpenSimplexNoise simplex,
      CellNoise cell,
      float strength,
      float river) {

    /**
     * Using rDecorateSeedBiome() to partially decorate the biome? If so, then comment out this
     * method.
     */
    rOreGenSeedBiome(world, rand, chunkX, chunkY, simplex, cell, strength, river, baseBiome);

    // boulders
    for (int l = 0; l < 3f * strength; ++l) {
      int i1 = chunkX + rand.nextInt(16) + 8;
      int j1 = chunkY + rand.nextInt(16) + 8;
      int k1 = world.getHeightValue(i1, j1);

      if (k1 < 95 && rand.nextInt(16) == 0) {
        (new WorldGenBlob(Blocks.mossy_cobblestone, 0, rand)).generate(world, rand, i1, k1, j1);
      }
    }

    float l = simplex.noise2(chunkX / 100f, chunkY / 100f) * 6f + 0.8f;

    if (TerrainGen.decorate(world, rand, chunkX, chunkY, TREE)) {

      for (int b1 = 0; b1 < l * 4f * strength; b1++) {
        int j6 = chunkX + rand.nextInt(16) + 8;
        int k10 = chunkY + rand.nextInt(16) + 8;
        int z52 = world.getHeightValue(j6, k10);

        WorldGenerator worldgenerator =
            rand.nextInt(4) == 0
                ? new WorldGenTreeRTGSpruceSmall(1 + rand.nextInt(2))
                : rand.nextInt(6) == 0
                    ? new WorldGenTreeRTGPineSmall(1 + rand.nextInt(3), 4 + rand.nextInt(4))
                    : new WorldGenTreeRTGPineSmall(4 + rand.nextInt(6), 5 + rand.nextInt(10));
        worldgenerator.setScale(1.0D, 1.0D, 1.0D);
        worldgenerator.generate(world, rand, j6, z52, k10);
      }

      if (this.config.getPropertyById(BiomeConfigVanillaColdTaiga.decorationLogsId).valueBoolean) {

        if (l > 0f && rand.nextInt(6) == 0) {
          int x22 = chunkX + rand.nextInt(16) + 8;
          int z22 = chunkY + rand.nextInt(16) + 8;
          int y22 = world.getHeightValue(x22, z22);
          (new WorldGenLog(1, 3 + rand.nextInt(4), false)).generate(world, rand, x22, y22, z22);
        }
      }

      for (int b = 0; b < 2f * strength; b++) {
        int i1 = chunkX + rand.nextInt(16) + 8;
        int j1 = chunkY + rand.nextInt(16) + 8;
        int k1 = world.getHeightValue(i1, j1);
        if (rand.nextInt(10) == 0) {
          (new WorldGenTreeRTGShrub(rand.nextInt(5) + 4, rand.nextInt(2), rand.nextInt(2)))
              .generate(world, rand, i1, k1, j1);
        } else {
          (new WorldGenTreeRTGShrub(rand.nextInt(4) + 1, rand.nextInt(2), rand.nextInt(2)))
              .generate(world, rand, i1, k1, j1);
        }
      }
    }

    if (TerrainGen.decorate(world, rand, chunkX, chunkY, SHROOM)) {

      if (rand.nextInt((int) (3f / strength)) == 0) {
        int k15 = chunkX + rand.nextInt(16) + 8;
        int k17 = rand.nextInt(64) + 64;
        int k20 = chunkY + rand.nextInt(16) + 8;

        if (rand.nextBoolean()) {
          (new WorldGenFlowers(Blocks.brown_mushroom)).generate(world, rand, k15, k17, k20);
        } else {
          (new WorldGenFlowers(Blocks.red_mushroom)).generate(world, rand, k15, k17, k20);
        }
      }
    }

    if (TerrainGen.decorate(world, rand, chunkX, chunkY, PUMPKIN)) {

      if (rand.nextInt((int) (20f / strength)) == 0) {
        int j16 = chunkX + rand.nextInt(16) + 8;
        int j18 = rand.nextInt(128);
        int j21 = chunkY + rand.nextInt(16) + 8;
        (new WorldGenPumpkin()).generate(world, rand, j16, j18, j21);
      }
    }

    if (TerrainGen.decorate(world, rand, chunkX, chunkY, GRASS)) {

      for (int l14 = 0; l14 < 10f * strength; l14++) {
        int l19 = chunkX + rand.nextInt(16) + 8;
        int k22 = rand.nextInt(128);
        int j24 = chunkY + rand.nextInt(16) + 8;
        (new WorldGenGrass(Blocks.tallgrass, 1)).generate(world, rand, l19, k22, j24);
      }
    }
  }
  @Override
  public void rDecorate(
      World world,
      Random rand,
      int chunkX,
      int chunkY,
      OpenSimplexNoise simplex,
      CellNoise cell,
      float strength,
      float river) {

    /**
     * Using rDecorateSeedBiome() to partially decorate the biome? If so, then comment out this
     * method.
     */
    // rOreGenSeedBiome(world, rand, chunkX, chunkY, simplex, cell, strength, river, baseBiome);

    float l = simplex.noise2(chunkX / 80f, chunkY / 80f) * 60f - 15f;
    // float l = simplex.noise3(chunkX / 80f, chunkY / 80f, simplex.noise2(chunkX / 60f, chunkY /
    // 60f)) * 60f - 15f;

    for (int l1 = 0; l1 < 2f * strength; ++l1) {
      int i1 = chunkX + rand.nextInt(16) + 8;
      int j1 = chunkY + rand.nextInt(16) + 8;
      int k1 = world.getHeightValue(i1, j1);

      if (k1 < 80 && rand.nextInt(20) == 0) {
        if (rand.nextInt(8) != 0) {
          (new WorldGenBlob(Blocks.mossy_cobblestone, 0, rand)).generate(world, rand, i1, k1, j1);
        } else {
          (new WorldGenBlob(Blocks.web, 0, rand)).generate(world, rand, i1, k1, j1);
        }
      }
    }

    if (l > 0f) {
      for (int b2 = 0; b2 < 24f * strength; b2++) {
        int j6 = chunkX + rand.nextInt(16) + 8;
        int k10 = chunkY + rand.nextInt(16) + 8;
        int z52 = world.getHeightValue(j6, k10);

        if (z52 < 120) {
          WorldGenerator worldgenerator =
              new WorldGenTreeMangrove(
                  Blocks.log2,
                  1,
                  Blocks.leaves2,
                  1,
                  9 + rand.nextInt(5),
                  3 + rand.nextInt(2),
                  13f,
                  3,
                  0.32f,
                  0.1f);
          worldgenerator.setScale(1.0D, 1.0D, 1.0D);
          worldgenerator.generate(world, rand, j6, z52, k10);
        }
      }
    }

    if (rand.nextInt((int) (10f / strength)) == 0) {
      int x22 = chunkX + rand.nextInt(16) + 8;
      int z22 = chunkY + rand.nextInt(16) + 8;
      int y22 = world.getHeightValue(x22, z22);
      if (y22 < 100) {
        (new WorldGenLog(Blocks.log2, 1, Blocks.leaves2, -1, 9 + rand.nextInt(5)))
            .generate(world, rand, x22, y22, z22);
      }
    }

    for (int f24 = 0; f24 < strength; f24++) {
      int i1 = chunkX + rand.nextInt(16) + 8;
      int j1 = chunkY + rand.nextInt(16) + 8;
      int k1 = world.getHeightValue(i1, j1);
      if (k1 < 110) {
        (new WorldGenTreeShrub(rand.nextInt(4) + 1, 0, rand.nextInt(3)))
            .generate(world, rand, i1, k1, j1);
      }
    }

    if (TerrainGen.decorate(world, rand, chunkX, chunkY, GRASS)) {

      for (int l14 = 0; l14 < 10f * strength; l14++) {
        int l19 = chunkX + rand.nextInt(16) + 8;
        int k22 = rand.nextInt(128);
        int j24 = chunkY + rand.nextInt(16) + 8;
        int grassMeta;

        if (rand.nextInt(16) == 0) {
          grassMeta = 0;
        } else {
          grassMeta = 1;
        }

        (new WorldGenGrass(Blocks.tallgrass, grassMeta)).generate(world, rand, l19, k22, j24);
      }

      for (int l14 = 0; l14 < 8f * strength; l14++) {
        int l19 = chunkX + rand.nextInt(16) + 8;
        int k22 = rand.nextInt(128);
        int j24 = chunkY + rand.nextInt(16) + 8;

        if (rand.nextInt(6) == 0) {
          (new WorldGenGrass(Blocks.double_plant, RandomUtil.getRandomInt(rand, 2, 3)))
              .generate(world, rand, l19, k22, j24);
        }
      }

      for (int l14 = 0; l14 < 4f * strength; l14++) {
        int l19 = chunkX + rand.nextInt(16) + 8;
        int k22 = rand.nextInt(128);
        int j24 = chunkY + rand.nextInt(16) + 8;
        int grassMeta;

        if (rand.nextInt(16) == 0) {
          grassMeta = 0;
        } else {
          grassMeta = RandomUtil.getRandomInt(rand, 1, 2);
        }

        (new WorldGenGrass(Blocks.tallgrass, grassMeta)).generate(world, rand, l19, k22, j24);
      }
    }

    rDecorateSeedBiome(world, rand, chunkX, chunkY, simplex, cell, strength, river, baseBiome);

    int k15 = chunkX + rand.nextInt(16) + 8;
    int k20 = chunkY + rand.nextInt(16) + 8;
    int k17 = world.getHeightValue(k15, k20);

    if (rand.nextBoolean()) {
      (new WorldGenFlowers(Blocks.brown_mushroom)).generate(world, rand, k15, k17, k20);
    } else {
      (new WorldGenFlowers(Blocks.red_mushroom)).generate(world, rand, k15, k17, k20);
    }
  }