| 1 | package net.minecraft.world.biome;
|
| 2 |
|
| 3 | import java.util.Random;
|
| 4 | import net.minecraft.init.Blocks;
|
| 5 | import net.minecraft.util.BlockPos;
|
| 6 | import net.minecraft.world.World;
|
| 7 | import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
| 8 | import net.minecraft.world.gen.feature.WorldGenIcePath;
|
| 9 | import net.minecraft.world.gen.feature.WorldGenIceSpike;
|
| 10 | import net.minecraft.world.gen.feature.WorldGenTaiga2;
|
| 11 |
|
| 12 | public class BiomeGenSnow extends BiomeGenBase
|
| 13 | {
|
| 14 | private boolean field_150615_aC;
|
| 15 | private WorldGenIceSpike field_150616_aD = new WorldGenIceSpike();
|
| 16 | private WorldGenIcePath field_150617_aE = new WorldGenIcePath(4);
|
| 17 |
|
| 18 | public BiomeGenSnow(int id, boolean p_i45378_2_)
|
| 19 | {
|
| 20 | super(id);
|
| 21 | this.field_150615_aC = p_i45378_2_;
|
| 22 |
|
| 23 | if (p_i45378_2_)
|
| 24 | {
|
| 25 | this.topBlock = Blocks.snow.getDefaultState();
|
| 26 | }
|
| 27 |
|
| 28 | this.spawnableCreatureList.clear();
|
| 29 | }
|
| 30 |
|
| 31 | public void decorate(World worldIn, Random rand, BlockPos pos)
|
| 32 | {
|
| 33 | if (this.field_150615_aC)
|
| 34 | {
|
| 35 | for (int i = 0; i < 3; ++i)
|
| 36 | {
|
| 37 | int j = rand.nextInt(16) + 8;
|
| 38 | int k = rand.nextInt(16) + 8;
|
| 39 | this.field_150616_aD.generate(worldIn, rand, worldIn.getHeight(pos.add(j, 0, k)));
|
| 40 | }
|
| 41 |
|
| 42 | for (int l = 0; l < 2; ++l)
|
| 43 | {
|
| 44 | int i1 = rand.nextInt(16) + 8;
|
| 45 | int j1 = rand.nextInt(16) + 8;
|
| 46 | this.field_150617_aE.generate(worldIn, rand, worldIn.getHeight(pos.add(i1, 0, j1)));
|
| 47 | }
|
| 48 | }
|
| 49 |
|
| 50 | super.decorate(worldIn, rand, pos);
|
| 51 | }
|
| 52 |
|
| 53 | public WorldGenAbstractTree genBigTreeChance(Random rand)
|
| 54 | {
|
| 55 | return new WorldGenTaiga2(false);
|
| 56 | }
|
| 57 |
|
| 58 | protected BiomeGenBase createMutatedBiome(int p_180277_1_)
|
| 59 | {
|
| 60 | BiomeGenBase biomegenbase = (new BiomeGenSnow(p_180277_1_, true)).func_150557_a(13828095, true).setBiomeName(this.biomeName + " Spikes").setEnableSnow().setTemperatureRainfall(0.0F, 0.5F).setHeight(new BiomeGenBase.Height(this.minHeight + 0.1F, this.maxHeight + 0.1F));
|
| 61 | biomegenbase.minHeight = this.minHeight + 0.3F;
|
| 62 | biomegenbase.maxHeight = this.maxHeight + 0.4F;
|
| 63 | return biomegenbase;
|
| 64 | }
|
| 65 | }
|
| 66 |
|