    001package net.minecraft.world.biome;
    002
    003import java.util.Random;
    004import net.minecraft.block.Block;
    005import net.minecraft.world.World;
    006import net.minecraft.world.gen.feature.WorldGenMinable;
    007import net.minecraft.world.gen.feature.WorldGenerator;
    008
    009public class BiomeGenHills extends BiomeGenBase
    010{
    011    private WorldGenerator theWorldGenerator;
    012
    013    protected BiomeGenHills(int par1)
    014    {
    015        super(par1);
    016        this.theWorldGenerator = new WorldGenMinable(Block.silverfish.blockID, 8);
    017    }
    018
    019    public void decorate(World par1World, Random par2Random, int par3, int par4)
    020    {
    021        super.decorate(par1World, par2Random, par3, par4);
    022        int k = 3 + par2Random.nextInt(6);
    023        int l;
    024        int i1;
    025        int j1;
    026
    027        for (l = 0; l < k; ++l)
    028        {
    029            i1 = par3 + par2Random.nextInt(16);
    030            j1 = par2Random.nextInt(28) + 4;
    031            int k1 = par4 + par2Random.nextInt(16);
    032            int l1 = par1World.getBlockId(i1, j1, k1);
    033
    034            if (l1 == Block.stone.blockID)
    035            {
    036                par1World.setBlock(i1, j1, k1, Block.oreEmerald.blockID, 0, 2);
    037            }
    038        }
    039
    040        for (k = 0; k < 7; ++k)
    041        {
    042            l = par3 + par2Random.nextInt(16);
    043            i1 = par2Random.nextInt(64);
    044            j1 = par4 + par2Random.nextInt(16);
    045            this.theWorldGenerator.generate(par1World, par2Random, l, i1, j1);
    046        }
    047    }
    048}