| 1 | package net.minecraft.world.biome;
|
| 2 |
|
| 3 | import com.google.common.collect.Lists;
|
| 4 | import java.util.Random;
|
| 5 | import net.minecraft.util.BlockPos;
|
| 6 | import net.minecraft.world.World;
|
| 7 | import net.minecraft.world.chunk.ChunkPrimer;
|
| 8 | import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
| 9 |
|
| 10 | public class BiomeGenMutated extends BiomeGenBase
|
| 11 | {
|
| 12 | protected BiomeGenBase baseBiome;
|
| 13 |
|
| 14 | public BiomeGenMutated(int id, BiomeGenBase biome)
|
| 15 | {
|
| 16 | super(id);
|
| 17 | this.baseBiome = biome;
|
| 18 | this.func_150557_a(biome.color, true);
|
| 19 | this.biomeName = biome.biomeName + " M";
|
| 20 | this.topBlock = biome.topBlock;
|
| 21 | this.fillerBlock = biome.fillerBlock;
|
| 22 | this.fillerBlockMetadata = biome.fillerBlockMetadata;
|
| 23 | this.minHeight = biome.minHeight;
|
| 24 | this.maxHeight = biome.maxHeight;
|
| 25 | this.temperature = biome.temperature;
|
| 26 | this.rainfall = biome.rainfall;
|
| 27 | this.waterColorMultiplier = biome.waterColorMultiplier;
|
| 28 | this.enableSnow = biome.enableSnow;
|
| 29 | this.enableRain = biome.enableRain;
|
| 30 | this.spawnableCreatureList = Lists.newArrayList(biome.spawnableCreatureList);
|
| 31 | this.spawnableMonsterList = Lists.newArrayList(biome.spawnableMonsterList);
|
| 32 | this.spawnableCaveCreatureList = Lists.newArrayList(biome.spawnableCaveCreatureList);
|
| 33 | this.spawnableWaterCreatureList = Lists.newArrayList(biome.spawnableWaterCreatureList);
|
| 34 | this.temperature = biome.temperature;
|
| 35 | this.rainfall = biome.rainfall;
|
| 36 | this.minHeight = biome.minHeight + 0.1F;
|
| 37 | this.maxHeight = biome.maxHeight + 0.2F;
|
| 38 | }
|
| 39 |
|
| 40 | public void decorate(World worldIn, Random rand, BlockPos pos)
|
| 41 | {
|
| 42 | this.baseBiome.theBiomeDecorator.decorate(worldIn, rand, this, pos);
|
| 43 | }
|
| 44 |
|
| 45 | public void genTerrainBlocks(World worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
|
| 46 | {
|
| 47 | this.baseBiome.genTerrainBlocks(worldIn, rand, chunkPrimerIn, x, z, noiseVal);
|
| 48 | }
|
| 49 |
|
| 50 | /**
|
| 51 | * returns the chance a creature has to spawn.
|
| 52 | */
|
| 53 | public float getSpawningChance()
|
| 54 | {
|
| 55 | return this.baseBiome.getSpawningChance();
|
| 56 | }
|
| 57 |
|
| 58 | public WorldGenAbstractTree genBigTreeChance(Random rand)
|
| 59 | {
|
| 60 | return this.baseBiome.genBigTreeChance(rand);
|
| 61 | }
|
| 62 |
|
| 63 | public int getFoliageColorAtPos(BlockPos pos)
|
| 64 | {
|
| 65 | return this.baseBiome.getFoliageColorAtPos(pos);
|
| 66 | }
|
| 67 |
|
| 68 | public int getGrassColorAtPos(BlockPos pos)
|
| 69 | {
|
| 70 | return this.baseBiome.getGrassColorAtPos(pos);
|
| 71 | }
|
| 72 |
|
| 73 | public Class <? extends BiomeGenBase > getBiomeClass()
|
| 74 | {
|
| 75 | return this.baseBiome.getBiomeClass();
|
| 76 | }
|
| 77 |
|
| 78 | /**
|
| 79 | * returns true if the biome specified is equal to this biome
|
| 80 | */
|
| 81 | public boolean isEqualTo(BiomeGenBase biome)
|
| 82 | {
|
| 83 | return this.baseBiome.isEqualTo(biome);
|
| 84 | }
|
| 85 |
|
| 86 | public BiomeGenBase.TempCategory getTempCategory()
|
| 87 | {
|
| 88 | return this.baseBiome.getTempCategory();
|
| 89 | }
|
| 90 | }
|
| 91 |
|