Tweaked the Tropics biome
This commit is contained in:
parent
c98636b6de
commit
096c3a995e
3 changed files with 112 additions and 5 deletions
|
@ -11,6 +11,7 @@ import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
import biomesoplenty.api.Blocks;
|
import biomesoplenty.api.Blocks;
|
||||||
import biomesoplenty.configuration.configfile.BOPConfigurationMisc;
|
import biomesoplenty.configuration.configfile.BOPConfigurationMisc;
|
||||||
import biomesoplenty.entities.EntityJungleSpider;
|
import biomesoplenty.entities.EntityJungleSpider;
|
||||||
|
import biomesoplenty.worldgen.WorldGenTropicsShrub;
|
||||||
import biomesoplenty.worldgen.tree.WorldGenPalmTree1;
|
import biomesoplenty.worldgen.tree.WorldGenPalmTree1;
|
||||||
import biomesoplenty.worldgen.tree.WorldGenPalmTree3;
|
import biomesoplenty.worldgen.tree.WorldGenPalmTree3;
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@ public class BiomeGenTropics extends BiomeGenBase
|
||||||
super(par1);
|
super(par1);
|
||||||
theBiomeDecorator = new BiomeDecoratorBOP(this);
|
theBiomeDecorator = new BiomeDecoratorBOP(this);
|
||||||
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
||||||
customBiomeDecorator.treesPerChunk = 4;
|
customBiomeDecorator.treesPerChunk = 6;
|
||||||
customBiomeDecorator.grassPerChunk = 7;
|
customBiomeDecorator.grassPerChunk = 7;
|
||||||
customBiomeDecorator.wheatGrassPerChunk = 4;
|
customBiomeDecorator.wheatGrassPerChunk = 4;
|
||||||
customBiomeDecorator.flowersPerChunk = 10;
|
customBiomeDecorator.flowersPerChunk = 10;
|
||||||
|
@ -67,7 +68,7 @@ public class BiomeGenTropics extends BiomeGenBase
|
||||||
@Override
|
@Override
|
||||||
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
||||||
{
|
{
|
||||||
return par1Random.nextInt(3) == 0 ? new WorldGenPalmTree1() : new WorldGenPalmTree3();
|
return par1Random.nextInt(3) == 0 ? new WorldGenPalmTree1() : (par1Random.nextInt(2) == 0 ? new WorldGenTropicsShrub() : new WorldGenPalmTree3());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,7 +78,7 @@ public class BiomeGenTropics extends BiomeGenBase
|
||||||
public int getSkyColorByTemp(float par1)
|
public int getSkyColorByTemp(float par1)
|
||||||
{
|
{
|
||||||
if (BOPConfigurationMisc.skyColors)
|
if (BOPConfigurationMisc.skyColors)
|
||||||
return 3333631;
|
return 507391;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
par1 /= 3.0F;
|
par1 /= 3.0F;
|
||||||
|
|
|
@ -285,8 +285,8 @@ public class BOPBiomes {
|
||||||
Biomes.timberThin = Optional.of((new BiomeGenTimberThin(BOPConfigurationIDs.timberThinID)).setColor(353825).setBiomeName("Thinned Timber").func_76733_a(5159473).setTemperatureRainfall(0.7F, 0.8F).setMinMaxHeight(0.3F, 0.4F));
|
Biomes.timberThin = Optional.of((new BiomeGenTimberThin(BOPConfigurationIDs.timberThinID)).setColor(353825).setBiomeName("Thinned Timber").func_76733_a(5159473).setTemperatureRainfall(0.7F, 0.8F).setMinMaxHeight(0.3F, 0.4F));
|
||||||
Biomes.tropicalRainforest = Optional.of((new BiomeGenTropicalRainforest(BOPConfigurationIDs.tropicalRainforestID)).setColor(9286496).setBiomeName("Tropical Rainforest").setTemperatureRainfall(1.2F, 0.9F).setMinMaxHeight(0.3F, 0.7F));
|
Biomes.tropicalRainforest = Optional.of((new BiomeGenTropicalRainforest(BOPConfigurationIDs.tropicalRainforestID)).setColor(9286496).setBiomeName("Tropical Rainforest").setTemperatureRainfall(1.2F, 0.9F).setMinMaxHeight(0.3F, 0.7F));
|
||||||
|
|
||||||
Biomes.tropics = Optional.of((new BiomeGenTropics(BOPConfigurationIDs.tropicsID)).setColor(9286496).setBiomeName("Tropics").setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.1F, 0.5F));
|
Biomes.tropics = Optional.of((new BiomeGenTropics(BOPConfigurationIDs.tropicsID)).setColor(9286496).setBiomeName("Tropics").setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.0F, 0.4F));
|
||||||
Biomes.tropicsMountain = Optional.of((new BiomeGenTropics(BOPConfigurationIDs.tropicsMountainID)).setColor(9286496).setBiomeName("Tropics Mountain").setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.5F, 1.1F));
|
Biomes.tropicsMountain = Optional.of((new BiomeGenTropics(BOPConfigurationIDs.tropicsMountainID)).setColor(9286496).setBiomeName("Tropics Mountain").setTemperatureRainfall(2.0F, 2.0F).setMinMaxHeight(0.4F, 1.2F));
|
||||||
|
|
||||||
Biomes.tundra = Optional.of((new BiomeGenTundra(BOPConfigurationIDs.tundraID)).setColor(14090235).setBiomeName("Tundra").setTemperatureRainfall(0.2F, 0.8F).setMinMaxHeight(0.1F, 0.3F));
|
Biomes.tundra = Optional.of((new BiomeGenTundra(BOPConfigurationIDs.tundraID)).setColor(14090235).setBiomeName("Tundra").setTemperatureRainfall(0.2F, 0.8F).setMinMaxHeight(0.1F, 0.3F));
|
||||||
Biomes.volcano = Optional.of((new BiomeGenVolcano(BOPConfigurationIDs.volcanoID)).setColor(9286496).setBiomeName("Volcano").setDisableRain().setMinMaxHeight(0.6F, 0.9F).setTemperatureRainfall(2.0F, 0.05F));
|
Biomes.volcano = Optional.of((new BiomeGenVolcano(BOPConfigurationIDs.volcanoID)).setColor(9286496).setBiomeName("Volcano").setDisableRain().setMinMaxHeight(0.6F, 0.9F).setTemperatureRainfall(2.0F, 0.05F));
|
||||||
|
|
106
common/biomesoplenty/worldgen/WorldGenTropicsShrub.java
Normal file
106
common/biomesoplenty/worldgen/WorldGenTropicsShrub.java
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
package biomesoplenty.worldgen;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
|
|
||||||
|
public class WorldGenTropicsShrub extends WorldGenerator
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public boolean generate(World var1, Random var2, int var3, int var4, int var5)
|
||||||
|
{
|
||||||
|
while (var1.isAirBlock(var3, var4, var5) && var4 > 2)
|
||||||
|
{
|
||||||
|
--var4;
|
||||||
|
}
|
||||||
|
|
||||||
|
int var6 = var1.getBlockId(var3, var4, var5);
|
||||||
|
|
||||||
|
if (var6 != Block.grass.blockID && var6 != Block.sand.blockID)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int var7 = -2; var7 <= 2; ++var7)
|
||||||
|
{
|
||||||
|
for (int var8 = -2; var8 <= 2; ++var8)
|
||||||
|
{
|
||||||
|
if (var1.isAirBlock(var3 + var7, var4 - 1, var5 + var8) && var1.isAirBlock(var3 + var7, var4 - 2, var5 + var8))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var1.setBlock(var3, var4, var5, Block.dirt.blockID);
|
||||||
|
var1.setBlock(var3, var4 + 1, var5, Block.wood.blockID, 3, 2);
|
||||||
|
var1.setBlock(var3, var4 + 2, var5, Block.wood.blockID, 3, 2);
|
||||||
|
var1.setBlock(var3 + 1, var4 + 2, var5, Block.leaves.blockID, 3, 2);
|
||||||
|
var1.setBlock(var3 - 1, var4 + 2, var5, Block.leaves.blockID, 3, 2);
|
||||||
|
var1.setBlock(var3, var4 + 2, var5 + 1, Block.leaves.blockID, 3, 2);
|
||||||
|
var1.setBlock(var3, var4 + 2, var5 - 1, Block.leaves.blockID, 3, 2);
|
||||||
|
var1.setBlock(var3, var4 + 3, var5, Block.leaves.blockID, 3, 2);
|
||||||
|
|
||||||
|
int var999 = var2.nextInt(12);
|
||||||
|
int var998 = var2.nextInt(4);
|
||||||
|
|
||||||
|
if (var998 == 0)
|
||||||
|
{
|
||||||
|
if (var999 == 0)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3 - 1, var4 + 1, var5, Block.cocoaPlant.blockID, 11, 2);
|
||||||
|
}
|
||||||
|
if (var999 == 1)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3 + 1, var4 + 1, var5, Block.cocoaPlant.blockID, 9, 2);
|
||||||
|
}
|
||||||
|
if (var999 == 2)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3, var4 + 1, var5 - 1, Block.cocoaPlant.blockID, 8, 2);
|
||||||
|
}
|
||||||
|
if (var999 == 3)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3, var4 + 1, var5 + 1, Block.cocoaPlant.blockID, 10, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (var998 == 1)
|
||||||
|
{
|
||||||
|
if (var999 == 0)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3 - 1, var4 + 1, var5, Block.cocoaPlant.blockID, 7, 2);
|
||||||
|
}
|
||||||
|
if (var999 == 1)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3 + 1, var4 + 1, var5, Block.cocoaPlant.blockID, 5, 2);
|
||||||
|
}
|
||||||
|
if (var999 == 2)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3, var4 + 1, var5 - 1, Block.cocoaPlant.blockID, 4, 2);
|
||||||
|
}
|
||||||
|
if (var999 == 3)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3, var4 + 1, var5 + 1, Block.cocoaPlant.blockID, 6, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (var998 == 2)
|
||||||
|
{
|
||||||
|
if (var999 == 0)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3 - 1, var4 + 1, var5, Block.cocoaPlant.blockID, 3, 2);
|
||||||
|
}
|
||||||
|
if (var999 == 1)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3 + 1, var4 + 1, var5, Block.cocoaPlant.blockID, 1, 2);
|
||||||
|
}
|
||||||
|
if (var999 == 2)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3, var4 + 1, var5 - 1, Block.cocoaPlant.blockID, 0, 2);
|
||||||
|
}
|
||||||
|
if (var999 == 3)
|
||||||
|
{
|
||||||
|
var1.setBlock(var3, var4 + 1, var5 + 1, Block.cocoaPlant.blockID, 2, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue