package net.minecraft.world.biome; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenAbstractTree; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenTaiga2; import net.minecraft.world.gen.feature.WorldGenerator; public class BiomeGenHills extends BiomeGenBase { private WorldGenerator theWorldGenerator; private WorldGenTaiga2 field_150634_aD; private int field_150635_aE; private int field_150636_aF; private int field_150637_aG; private int field_150638_aH; private static final String __OBFID = "CL_00000168"; public BiomeGenHills(int p_i45373_1_, boolean p_i45373_2_) { super(p_i45373_1_); this.theWorldGenerator = new WorldGenMinable(Blocks.monster_egg, 8); this.field_150634_aD = new WorldGenTaiga2(false); this.field_150635_aE = 0; this.field_150636_aF = 1; this.field_150637_aG = 2; this.field_150638_aH = this.field_150635_aE; if (p_i45373_2_) { this.theBiomeDecorator.treesPerChunk = 3; this.field_150638_aH = this.field_150636_aF; } } public WorldGenAbstractTree func_150567_a(Random p_150567_1_) { return (WorldGenAbstractTree)(p_150567_1_.nextInt(3) > 0 ? this.field_150634_aD : super.func_150567_a(p_150567_1_)); } public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_) { super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_); int k = 3 + p_76728_2_.nextInt(6); int l; int i1; int j1; for (l = 0; l < k; ++l) { i1 = p_76728_3_ + p_76728_2_.nextInt(16); j1 = p_76728_2_.nextInt(28) + 4; int k1 = p_76728_4_ + p_76728_2_.nextInt(16); if (p_76728_1_.getBlock(i1, j1, k1).isReplaceableOreGen(p_76728_1_, i1, j1, k1, Blocks.stone)) { p_76728_1_.setBlock(i1, j1, k1, Blocks.emerald_ore, 0, 2); } } for (k = 0; k < 7; ++k) { l = p_76728_3_ + p_76728_2_.nextInt(16); i1 = p_76728_2_.nextInt(64); j1 = p_76728_4_ + p_76728_2_.nextInt(16); this.theWorldGenerator.generate(p_76728_1_, p_76728_2_, l, i1, j1); } } public void genTerrainBlocks(World p_150573_1_, Random p_150573_2_, Block[] p_150573_3_, byte[] p_150573_4_, int p_150573_5_, int p_150573_6_, double p_150573_7_) { this.topBlock = Blocks.grass; this.topBlockMetadata = 0; this.fillerBlock = Blocks.dirt; if ((p_150573_7_ < -1.0D || p_150573_7_ > 2.0D) && this.field_150638_aH == this.field_150637_aG) { this.topBlock = Blocks.gravel; this.fillerBlock = Blocks.gravel; } else if (p_150573_7_ > 1.0D && this.field_150638_aH != this.field_150636_aF) { this.topBlock = Blocks.stone; this.fillerBlock = Blocks.stone; } this.genBiomeTerrain(p_150573_1_, p_150573_2_, p_150573_3_, p_150573_4_, p_150573_5_, p_150573_6_, p_150573_7_); } /** * this creates a mutation specific to Hills biomes */ public BiomeGenHills mutateHills(BiomeGenBase p_150633_1_) { this.field_150638_aH = this.field_150637_aG; this.func_150557_a(p_150633_1_.color, true); this.setBiomeName(p_150633_1_.biomeName + " M"); this.setHeight(new BiomeGenBase.Height(p_150633_1_.minHeight, p_150633_1_.maxHeight)); this.setTemperatureRainfall(p_150633_1_.temperature, p_150633_1_.rainfall); return this; } /** * Creates a mutated version of the biome and places it into the biomeList with an index equal to the original plus * 128 */ public BiomeGenBase createMutation() { return (new BiomeGenHills(this.biomeID + 128, false)).mutateHills(this); } }