Reverted the Tropical Rainforest/Rainforest switch
This commit is contained in:
parent
8919484b7c
commit
5146469d47
3 changed files with 92 additions and 92 deletions
|
@ -1,45 +1,37 @@
|
|||
package biomesoplenty.biomes;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.configuration.BOPConfiguration;
|
||||
import biomesoplenty.mobs.EntityJungleSpider;
|
||||
import biomesoplenty.worldgen.WorldGenRainforest1;
|
||||
import biomesoplenty.worldgen.WorldGenRainforest2;
|
||||
import biomesoplenty.worldgen.WorldGenRainforestTree1;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class BiomeGenRainforest extends BiomeGenBase
|
||||
{
|
||||
private BiomeDecoratorBOP customBiomeDecorator;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("unchecked")
|
||||
public BiomeGenRainforest(int par1)
|
||||
{
|
||||
super(par1);
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
|
||||
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
|
||||
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
||||
this.customBiomeDecorator.treesPerChunk = 12;
|
||||
this.customBiomeDecorator.grassPerChunk = 7;
|
||||
this.customBiomeDecorator.highGrassPerChunk = 4;
|
||||
this.customBiomeDecorator.reedsPerChunk = 10;
|
||||
this.customBiomeDecorator.waterlilyPerChunk = 2;
|
||||
this.customBiomeDecorator.orangeFlowersPerChunk = 10;
|
||||
this.customBiomeDecorator.treesPerChunk = 14;
|
||||
this.customBiomeDecorator.grassPerChunk = 25;
|
||||
this.customBiomeDecorator.pinkFlowersPerChunk = 2;
|
||||
this.customBiomeDecorator.flowersPerChunk = 25;
|
||||
this.customBiomeDecorator.rosesPerChunk = 10;
|
||||
this.customBiomeDecorator.mushroomsPerChunk = 25;
|
||||
this.customBiomeDecorator.orangeFlowersPerChunk = 6;
|
||||
this.customBiomeDecorator.generatePumpkins = false;
|
||||
this.customBiomeDecorator.generateMelons = true;
|
||||
this.customBiomeDecorator.sproutsPerChunk = 2;
|
||||
this.customBiomeDecorator.quicksandPerChunk = 3;
|
||||
this.customBiomeDecorator.poisonIvyPerChunk = 4;
|
||||
this.customBiomeDecorator.lilyflowersPerChunk = 2;
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntityJungleSpider.class, 12, 6, 6));
|
||||
this.waterColorMultiplier = 6160128;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,34 +39,23 @@ public class BiomeGenRainforest extends BiomeGenBase
|
|||
*/
|
||||
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
||||
{
|
||||
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenRainforest2() : new WorldGenRainforest1(false));
|
||||
return (WorldGenerator)(par1Random.nextInt(15) == 0 ? this.worldGeneratorForest : (par1Random.nextInt(5) == 0 ? this.worldGeneratorBigTree : new WorldGenRainforestTree1(false)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a WorldGen appropriate for this biome.
|
||||
*/
|
||||
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
|
||||
{
|
||||
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
|
||||
}
|
||||
|
||||
public void decorate(World par1World, Random par2Random, int par3, int par4)
|
||||
{
|
||||
super.decorate(par1World, par2Random, par3, par4);
|
||||
int var5 = 3 + par2Random.nextInt(6);
|
||||
|
||||
for (int var6 = 0; var6 < var5; ++var6)
|
||||
{
|
||||
int var7 = par3 + par2Random.nextInt(16);
|
||||
int var8 = par2Random.nextInt(28) + 4;
|
||||
int var9 = par4 + par2Random.nextInt(16);
|
||||
int var10 = par1World.getBlockId(var7, var8, var9);
|
||||
|
||||
if (var10 == Block.stone.blockID)
|
||||
{
|
||||
par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides the basic grass color based on the biome temperature and rainfall
|
||||
*/
|
||||
public int getBiomeGrassColor()
|
||||
{
|
||||
return 11002176;
|
||||
return 1759340;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,33 +63,6 @@ public class BiomeGenRainforest extends BiomeGenBase
|
|||
*/
|
||||
public int getBiomeFoliageColor()
|
||||
{
|
||||
return 8970560;
|
||||
}
|
||||
|
||||
/**
|
||||
* takes temperature, returns color
|
||||
*/
|
||||
public int getSkyColorByTemp(float par1)
|
||||
{
|
||||
if (BOPConfiguration.skyColors = true)
|
||||
{
|
||||
return 12971089;
|
||||
}
|
||||
else
|
||||
{
|
||||
par1 /= 3.0F;
|
||||
|
||||
if (par1 < -1.0F)
|
||||
{
|
||||
par1 = -1.0F;
|
||||
}
|
||||
|
||||
if (par1 > 1.0F)
|
||||
{
|
||||
par1 = 1.0F;
|
||||
}
|
||||
|
||||
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
|
||||
}
|
||||
return 1368687;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,37 +1,45 @@
|
|||
package biomesoplenty.biomes;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.configuration.BOPConfiguration;
|
||||
import biomesoplenty.mobs.EntityJungleSpider;
|
||||
import biomesoplenty.worldgen.WorldGenRainforestTree1;
|
||||
import biomesoplenty.worldgen.WorldGenRainforest1;
|
||||
import biomesoplenty.worldgen.WorldGenRainforest2;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.SpawnListEntry;
|
||||
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class BiomeGenTropicalRainforest extends BiomeGenBase
|
||||
{
|
||||
private BiomeDecoratorBOP customBiomeDecorator;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("unchecked")
|
||||
public BiomeGenTropicalRainforest(int par1)
|
||||
{
|
||||
super(par1);
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
|
||||
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
|
||||
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
||||
this.customBiomeDecorator.treesPerChunk = 14;
|
||||
this.customBiomeDecorator.grassPerChunk = 25;
|
||||
this.customBiomeDecorator.pinkFlowersPerChunk = 2;
|
||||
this.customBiomeDecorator.flowersPerChunk = 25;
|
||||
this.customBiomeDecorator.rosesPerChunk = 10;
|
||||
this.customBiomeDecorator.mushroomsPerChunk = 25;
|
||||
this.customBiomeDecorator.orangeFlowersPerChunk = 6;
|
||||
this.customBiomeDecorator.treesPerChunk = 12;
|
||||
this.customBiomeDecorator.grassPerChunk = 7;
|
||||
this.customBiomeDecorator.highGrassPerChunk = 4;
|
||||
this.customBiomeDecorator.reedsPerChunk = 10;
|
||||
this.customBiomeDecorator.waterlilyPerChunk = 2;
|
||||
this.customBiomeDecorator.orangeFlowersPerChunk = 10;
|
||||
this.customBiomeDecorator.generatePumpkins = false;
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
|
||||
this.customBiomeDecorator.generateMelons = true;
|
||||
this.customBiomeDecorator.sproutsPerChunk = 2;
|
||||
this.customBiomeDecorator.quicksandPerChunk = 3;
|
||||
this.customBiomeDecorator.poisonIvyPerChunk = 4;
|
||||
this.customBiomeDecorator.lilyflowersPerChunk = 2;
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntityJungleSpider.class, 12, 6, 6));
|
||||
this.waterColorMultiplier = 6160128;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,23 +47,34 @@ public class BiomeGenTropicalRainforest extends BiomeGenBase
|
|||
*/
|
||||
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
||||
{
|
||||
return (WorldGenerator)(par1Random.nextInt(15) == 0 ? this.worldGeneratorForest : (par1Random.nextInt(5) == 0 ? this.worldGeneratorBigTree : new WorldGenRainforestTree1(false)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a WorldGen appropriate for this biome.
|
||||
*/
|
||||
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
|
||||
{
|
||||
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
|
||||
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenRainforest2() : new WorldGenRainforest1(false));
|
||||
}
|
||||
|
||||
public void decorate(World par1World, Random par2Random, int par3, int par4)
|
||||
{
|
||||
super.decorate(par1World, par2Random, par3, par4);
|
||||
int var5 = 3 + par2Random.nextInt(6);
|
||||
|
||||
for (int var6 = 0; var6 < var5; ++var6)
|
||||
{
|
||||
int var7 = par3 + par2Random.nextInt(16);
|
||||
int var8 = par2Random.nextInt(28) + 4;
|
||||
int var9 = par4 + par2Random.nextInt(16);
|
||||
int var10 = par1World.getBlockId(var7, var8, var9);
|
||||
|
||||
if (var10 == Block.stone.blockID)
|
||||
{
|
||||
par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides the basic grass color based on the biome temperature and rainfall
|
||||
*/
|
||||
public int getBiomeGrassColor()
|
||||
{
|
||||
return 1759340;
|
||||
return 11002176;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,6 +82,33 @@ public class BiomeGenTropicalRainforest extends BiomeGenBase
|
|||
*/
|
||||
public int getBiomeFoliageColor()
|
||||
{
|
||||
return 1368687;
|
||||
return 8970560;
|
||||
}
|
||||
|
||||
/**
|
||||
* takes temperature, returns color
|
||||
*/
|
||||
public int getSkyColorByTemp(float par1)
|
||||
{
|
||||
if (BOPConfiguration.skyColors = true)
|
||||
{
|
||||
return 12971089;
|
||||
}
|
||||
else
|
||||
{
|
||||
par1 /= 3.0F;
|
||||
|
||||
if (par1 < -1.0F)
|
||||
{
|
||||
par1 = -1.0F;
|
||||
}
|
||||
|
||||
if (par1 > 1.0F)
|
||||
{
|
||||
par1 = 1.0F;
|
||||
}
|
||||
|
||||
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ public class BOPBiomes {
|
|||
Biomes.promisedLandSwamp = Optional.of((new BiomeGenPromisedLandSwamp(BOPConfiguration.promisedLandSwampID)).setColor(112).setBiomeName("Blessed Bog").setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.1F, 2.0F));
|
||||
|
||||
Biomes.quagmire = Optional.of((new BiomeGenQuagmire(BOPConfiguration.quagmireID)).setColor(522674).setBiomeName("Quagmire").func_76733_a(9154376).setMinMaxHeight(-0.1F, 0.3F).setTemperatureRainfall(0.8F, 0.9F));
|
||||
Biomes.rainforest = Optional.of((new BiomeGenRainforest(BOPConfiguration.rainforestID)).setColor(9286496).setBiomeName("Rainforest").setTemperatureRainfall(1.2F, 0.9F).setMinMaxHeight(0.3F, 0.7F));
|
||||
Biomes.rainforest = Optional.of((new BiomeGenRainforest(BOPConfiguration.rainforestID)).setColor(5470985).setBiomeName("Rainforest").func_76733_a(5470985).setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.7F, 1.8F));
|
||||
Biomes.redwoodForest = Optional.of((new BiomeGenRedwoodForest(BOPConfiguration.redwoodForestID)).setColor(747097).setBiomeName("Redwood Forest").func_76733_a(5159473).setTemperatureRainfall(0.8F, 0.4F).setMinMaxHeight(0.0F, 0.4F));
|
||||
Biomes.sacredSprings = Optional.of((new BiomeGenSacredSprings(BOPConfiguration.sacredSpringsID)).setColor(522674).setBiomeName("Sacred Springs").func_76733_a(9154376).setMinMaxHeight(0.4F, 1.2F).setTemperatureRainfall(1.2F, 0.9F));
|
||||
Biomes.savanna = Optional.of((new BiomeGenSavanna(BOPConfiguration.savannaID)).setColor(9286496).setBiomeName("Savanna").setTemperatureRainfall(1.5F, 0.1F).setMinMaxHeight(0.1F, 0.1F));
|
||||
|
@ -151,7 +151,7 @@ public class BOPBiomes {
|
|||
Biomes.temperateRainforest = Optional.of((new BiomeGenTemperateRainforest(BOPConfiguration.temperateRainforestID)).setColor(353825).setBiomeName("Temperate Rainforest").func_76733_a(5159473).setTemperatureRainfall(0.7F, 0.8F).setMinMaxHeight(0.2F, 1.2F));
|
||||
Biomes.thicket = Optional.of((new BiomeGenThicket(BOPConfiguration.thicketID)).setColor(353825).setBiomeName("Thicket").func_76733_a(5159473).setTemperatureRainfall(0.6F, 0.2F).setMinMaxHeight(0.0F, 0.2F));
|
||||
Biomes.timber = Optional.of((new BiomeGenTimber(BOPConfiguration.timberID)).setColor(353825).setBiomeName("Timber").func_76733_a(5159473).setTemperatureRainfall(0.7F, 0.8F).setMinMaxHeight(0.0F, 0.2F));
|
||||
Biomes.tropicalRainforest = Optional.of((new BiomeGenTropicalRainforest(BOPConfiguration.tropicalRainforestID)).setColor(5470985).setBiomeName("Tropical Rainforest").func_76733_a(5470985).setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.7F, 1.8F));
|
||||
Biomes.tropicalRainforest = Optional.of((new BiomeGenTropicalRainforest(BOPConfiguration.tropicalRainforestID)).setColor(9286496).setBiomeName("Tropical Rainforest").setTemperatureRainfall(1.2F, 0.9F).setMinMaxHeight(0.3F, 0.7F));
|
||||
Biomes.tropics = Optional.of((new BiomeGenTropics(BOPConfiguration.tropicsID)).setColor(9286496).setBiomeName("Tropics").setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.1F, 1.5F));
|
||||
Biomes.tundra = Optional.of((new BiomeGenTundra(BOPConfiguration.tundraID)).setColor(14090235).setBiomeName("Tundra").setTemperatureRainfall(0.2F, 0.8F).setMinMaxHeight(-0.2F, 0.4F));
|
||||
Biomes.volcano = Optional.of((new BiomeGenVolcano(BOPConfiguration.volcanoID)).setColor(9286496).setBiomeName("Volcano").setDisableRain().setMinMaxHeight(0.6F, 0.9F).setTemperatureRainfall(2.0F, 0.0F));
|
||||
|
|
Loading…
Reference in a new issue