Readded the Prairie

This commit is contained in:
Adubbz 2014-01-10 18:50:38 +11:00
parent 46a550e576
commit 45271b33f8
3 changed files with 102 additions and 75 deletions

View file

@ -1,91 +1,111 @@
package biomesoplenty.common.biomes; package biomesoplenty.common.biomes;
import net.minecraft.world.biome.BiomeGenBase; import java.util.HashMap;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.BOPBlockHelper;
import biomesoplenty.common.world.features.WorldGenBOPFlora;
import biomesoplenty.common.world.features.WorldGenBOPTallGrass;
import biomesoplenty.common.world.features.trees.WorldGenBOPTaiga2;
public class BiomeGenPrairie extends BOPBiome public class BiomeGenPrairie extends BOPBiome
{ {
private static final Height biomeHeight = new Height(0.3F, 0.4F);
public BiomeGenPrairie(int par1)
public BiomeGenPrairie(int id)
{ {
super(par1); super(id);
/*
customBiomeDecorator.treesPerChunk = 1; //TODO: setHeight()
customBiomeDecorator.grassPerChunk = 999; this.func_150570_a(biomeHeight);
customBiomeDecorator.whiteFlowersPerChunk = 20; //TODO: setColor()
customBiomeDecorator.goldenrodsPerChunk = 40; this.setColor(13165952);
customBiomeDecorator.portobellosPerChunk = 2; this.setTemperatureRainfall(0.9F, 0.6F);
customBiomeDecorator.berryBushesPerChunk = 2;
customBiomeDecorator.wheatGrassPerChunk = 25; this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
customBiomeDecorator.shrubsPerChunk = 3;
customBiomeDecorator.waterReedsPerChunk = 4; this.theBiomeDecorator.treesPerChunk = 1;
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6)); this.theBiomeDecorator.grassPerChunk = 999;
*/
this.bopWorldFeatures.bopFlowersPerChunk = 30;
this.bopWorldFeatures.portobellosPerChunk = 2;
this.bopWorldFeatures.berryBushesPerChunk = 2;
this.bopWorldFeatures.shrubsPerChunk = 3;
this.bopWorldFeatures.waterReedsPerChunk = 4;
} }
/* @Override
@Override //TODO: getRandomWorldGenForTrees()
public void decorate(World par1World, Random par2Random, int par3, int par4) public WorldGenAbstractTree func_150567_a(Random random)
{ {
super.decorate(par1World, par2Random, par3, par4); return new WorldGenBOPTaiga2(Blocks.log, Blocks.leaves, 0, 0, false, 6, 1, 7);
int var5 = 12 + par2Random.nextInt(6); }
for (int var6 = 0; var6 < var5; ++var6) @Override
{ public HashMap<WorldGenerator, Double> getWeightedWorldGenForBOPFlowers()
int var7 = par3 + par2Random.nextInt(16); {
int var8 = par2Random.nextInt(28) + 4; HashMap<WorldGenerator, Double> flowerMap = new HashMap();
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9); flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 4), 1D);
flowerMap.put(new WorldGenBOPFlora(BOPBlockHelper.get("flowers"), 9), 0.5D);
Block block = Block.blocksList[var10];
if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID)) return flowerMap;
{ }
par1World.setBlock(var7, var8, var9, Blocks.amethystOre.get().blockID, 4, 2);
} @Override
} public HashMap<WorldGenerator, Double> getWeightedWorldGenForGrass()
} {
*/ HashMap<WorldGenerator, Double> grassMap = new HashMap();
/** grassMap.put(new WorldGenBOPTallGrass(Blocks.tallgrass, 1), 1D);
* Gets a WorldGen appropriate for this biome. grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 1), 0.5D);
*/ grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 2), 0.5D);
/* grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 10), 0.5D);
@Override grassMap.put(new WorldGenBOPTallGrass(BOPBlockHelper.get("foliage"), 11), 0.5D);
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{ return grassMap;
return new WorldGenPrairie(false); }
}
*/ @Override
public void decorate(World world, Random random, int chunkX, int chunkZ)
/** {
* Gets a WorldGen appropriate for this biome. super.decorate(world, random, chunkX, chunkZ);
*/ int var5 = 12 + random.nextInt(6);
/*
@Override for (int var6 = 0; var6 < var5; ++var6)
public WorldGenerator getRandomWorldGenForGrass(Random par1Random) {
{ int x = chunkX + random.nextInt(16);
return (par1Random.nextInt(5) == 0 ? new WorldGenTallGrass(Blocks.foliage.get().blockID, 1) : (par1Random.nextInt(3) == 0 ? new WorldGenTallGrass(Blocks.foliage.get().blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1))); int y = random.nextInt(28) + 4;
} int z = chunkZ + random.nextInt(16);
*/
//TODO: getBlock()
Block block = world.func_147439_a(x, y, z);
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
{
//TODO: setBlock()
world.func_147465_d(x, y, z, BOPBlockHelper.get("gemOre"), 4, 2);
}
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
/*
@Override @Override
public int getBiomeGrassColor() //TODO: getBiomeGrassColor()
{ public int func_150558_b(int p_150558_1_, int p_150558_2_, int p_150558_3_)
{
return 13165952; return 13165952;
} }
*/
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
/*
@Override @Override
public int getBiomeFoliageColor() //TODO: getBiomeFoliageColor()
{ public int func_150571_c(int x, int y, int z)
{
return 11395195; return 11395195;
} }
*/
} }

View file

@ -42,6 +42,7 @@ import biomesoplenty.common.biomes.BiomeGenOminousWoods;
import biomesoplenty.common.biomes.BiomeGenOriginValley; import biomesoplenty.common.biomes.BiomeGenOriginValley;
import biomesoplenty.common.biomes.BiomeGenOutback; import biomesoplenty.common.biomes.BiomeGenOutback;
import biomesoplenty.common.biomes.BiomeGenPasture; import biomesoplenty.common.biomes.BiomeGenPasture;
import biomesoplenty.common.biomes.BiomeGenPrairie;
import biomesoplenty.common.biomes.BiomeGenRainforest; import biomesoplenty.common.biomes.BiomeGenRainforest;
import biomesoplenty.common.biomes.BiomeGenSacredSprings; import biomesoplenty.common.biomes.BiomeGenSacredSprings;
import biomesoplenty.common.biomes.BiomeGenShrubland; import biomesoplenty.common.biomes.BiomeGenShrubland;
@ -126,7 +127,7 @@ public class BOPBiomes
registerBiome(new BOPBiomeListEntry(new BiomeGenOriginValley(BOPConfigurationIDs.originValleyID).setBiomeName("Origin Valley"), BOPBiomeTemperatureType.WARM)); registerBiome(new BOPBiomeListEntry(new BiomeGenOriginValley(BOPConfigurationIDs.originValleyID).setBiomeName("Origin Valley"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenOutback(BOPConfigurationIDs.outbackID).setBiomeName("Outback"), BOPBiomeTemperatureType.HOT)); registerBiome(new BOPBiomeListEntry(new BiomeGenOutback(BOPConfigurationIDs.outbackID).setBiomeName("Outback"), BOPBiomeTemperatureType.HOT));
registerBiome(new BOPBiomeListEntry(new BiomeGenPasture(BOPConfigurationIDs.pastureID).setBiomeName("Pasture"), BOPBiomeTemperatureType.WARM)); registerBiome(new BOPBiomeListEntry(new BiomeGenPasture(BOPConfigurationIDs.pastureID).setBiomeName("Pasture"), BOPBiomeTemperatureType.WARM));
//registerBiome(new BOPBiomeListEntry(new BiomeGenPrairie(BOPConfigurationIDs.prairieID).setBiomeName("Prairie"), BOPBiomeTemperatureType.WARM)); registerBiome(new BOPBiomeListEntry(new BiomeGenPrairie(BOPConfigurationIDs.prairieID).setBiomeName("Prairie"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenQuagmire(BOPConfigurationIDs.quagmireID).setBiomeName("Quagmire"), BOPBiomeTemperatureType.WARM));*/ /*registerBiome(new BOPBiomeListEntry(new BiomeGenQuagmire(BOPConfigurationIDs.quagmireID).setBiomeName("Quagmire"), BOPBiomeTemperatureType.WARM));*/
registerBiome(new BOPBiomeListEntry(new BiomeGenRainforest(BOPConfigurationIDs.rainforestID).setBiomeName("Rainforest"), BOPBiomeTemperatureType.WARM)); registerBiome(new BOPBiomeListEntry(new BiomeGenRainforest(BOPConfigurationIDs.rainforestID).setBiomeName("Rainforest"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenRedwoodForest(BOPConfigurationIDs.redwoodForestID).setBiomeName("Redwood Forest"), BOPBiomeTemperatureType.WARM));*/ /*registerBiome(new BOPBiomeListEntry(new BiomeGenRedwoodForest(BOPConfigurationIDs.redwoodForestID).setBiomeName("Redwood Forest"), BOPBiomeTemperatureType.WARM));*/

View file

@ -82,6 +82,12 @@ public class WorldGenBOPTaiga2 extends WorldGenAbstractTree
j1 = l - i1; j1 = l - i1;
k1 = 2 + random.nextInt(2); k1 = 2 + random.nextInt(2);
break; break;
case 7:
i1 = 2;
j1 = l - i1;
k1 = 3;
break;
default: default:
i1 = 1 + random.nextInt(2); i1 = 1 + random.nextInt(2);