This commit is contained in:
Adubbz 2013-08-01 16:20:56 +10:00
commit 0318800db4
6 changed files with 83 additions and 8 deletions

View file

@ -93,6 +93,7 @@ public class Biomes
public static Optional<? extends BiomeGenBase> redwoodForest = Optional.absent();
public static Optional<? extends BiomeGenBase> sacredSprings = Optional.absent();
public static Optional<? extends BiomeGenBase> savanna = Optional.absent();
public static Optional<? extends BiomeGenBase> savannaPlateau = Optional.absent();
public static Optional<? extends BiomeGenBase> scrubland = Optional.absent();
public static Optional<? extends BiomeGenBase> seasonalForest = Optional.absent();
public static Optional<? extends BiomeGenBase> seasonalSpruceForest = Optional.absent();

View file

@ -0,0 +1,69 @@
package biomesoplenty.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.Blocks;
import biomesoplenty.worldgen.WorldGenAcacia;
public class BiomeGenSavannaPlateau extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenSavannaPlateau(int par1)
{
super(par1);
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = 0;
customBiomeDecorator.flowersPerChunk = -999;
customBiomeDecorator.purpleFlowersPerChunk = 5;
customBiomeDecorator.tinyFlowersPerChunk = 1;
customBiomeDecorator.grassPerChunk = 10;
customBiomeDecorator.bushesPerChunk = 5;
customBiomeDecorator.generatePumpkins = false;
}
@Override
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 12 + 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, Blocks.amethystOre.get().blockID, 2, 2);
}
}
}
/**
* Gets a WorldGen appropriate for this biome.
*/
@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return par1Random.nextInt(3) == 0 ? new WorldGenAcacia(false) : new WorldGenShrub(0,0);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
@Override
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Blocks.foliage.get().blockID, 2) : new WorldGenTallGrass(Blocks.foliage.get().blockID, 1);
}
}

View file

@ -85,7 +85,7 @@ public class BOPBiomes {
Biomes.cherryBlossomGrove = Optional.of((new BiomeGenCherryBlossomGrove(BOPConfiguration.cherryBlossomGroveID)).setColor(9286496).setBiomeName("Cherry Blossom Grove").setMinMaxHeight(0.3F, 0.4F).setTemperatureRainfall(0.7F, 0.8F));
Biomes.coniferousForest = Optional.of((new BiomeGenConiferousForest(BOPConfiguration.coniferousForestID)).setColor(747097).setBiomeName("Coniferous Forest").func_76733_a(5159473).setTemperatureRainfall(0.5F, 0.4F).setMinMaxHeight(0.2F, 0.8F));
Biomes.coniferousForestSnow = Optional.of((new BiomeGenConiferousForestSnow(BOPConfiguration.coniferousForestSnowID)).setColor(14090235).setBiomeName("Snowy Coniferous Forest").setTemperatureRainfall(0.0F, 0.0F).setMinMaxHeight(0.2F, 0.7F));
Biomes.crag = Optional.of((new BiomeGenCrag(BOPConfiguration.cragID)).setColor(9286496).setBiomeName("Crag").setMinMaxHeight(0.0F, 9.9F).setTemperatureRainfall(0.4F, 0.2F));
Biomes.crag = Optional.of((new BiomeGenCrag(BOPConfiguration.cragID)).setColor(9286496).setBiomeName("Crag").setMinMaxHeight(2.0F, 3.0F).setTemperatureRainfall(0.4F, 0.2F));
Biomes.deadForest = Optional.of((new BiomeGenDeadForest(BOPConfiguration.deadForestID)).setColor(522674).setBiomeName("Dead Forest").func_76733_a(9154376).setMinMaxHeight(0.2F, 0.7F).setTemperatureRainfall(1.2F, 0.1F));
Biomes.deadForestSnow = Optional.of((new BiomeGenDeadForestSnow(BOPConfiguration.deadForestSnowID)).setColor(522674).setBiomeName("Snowy Dead Forest").func_76733_a(9154376).setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.2F, 0.7F));
Biomes.deadSwamp = Optional.of((new BiomeGenDeadSwamp(BOPConfiguration.deadSwampID)).setColor(522674).setBiomeName("Dead Swamp").func_76733_a(9154376).setMinMaxHeight(0.1F, 0.2F).setTemperatureRainfall(0.8F, 0.9F));
@ -105,9 +105,9 @@ public class BOPBiomes {
Biomes.highland = Optional.of((new BiomeGenHighland(BOPConfiguration.highlandID)).setColor(6316128).setBiomeName("Highland").setMinMaxHeight(0.9F, 1.9F).setTemperatureRainfall(0.5F, 0.5F));
Biomes.hotSprings = Optional.of((new BiomeGenHotSprings(BOPConfiguration.hotSpringsID)).setColor(10486015).setBiomeName("Hot Springs").setMinMaxHeight(0.2F, 0.5F).setTemperatureRainfall(0.5F, 0.7F));
Biomes.icyHills = Optional.of((new BiomeGenIcyHills(BOPConfiguration.icyHillsID)).setColor(14090235).setBiomeName("Icy Hills").setEnableSnow().setTemperatureRainfall(0.0F, 0.0F).setMinMaxHeight(0.3F, 0.8F));
Biomes.jadeCliffs = Optional.of((new BiomeGenJadeCliffs(BOPConfiguration.jadeCliffsID)).setColor(14090235).setBiomeName("Jade Cliffs").setTemperatureRainfall(0.5F, 0.1F).setMinMaxHeight(0.2F, 4.0F));
Biomes.jadeCliffs = Optional.of((new BiomeGenJadeCliffs(BOPConfiguration.jadeCliffsID)).setColor(14090235).setBiomeName("Jade Cliffs").setTemperatureRainfall(0.5F, 0.1F).setMinMaxHeight(0.5F, 1.5F));
Biomes.lushDesert = Optional.of((new BiomeGenLushDesert(BOPConfiguration.lushDesertID)).setColor(16421912).setBiomeName("Lush Desert").setTemperatureRainfall(0.8F, 0.2F).setMinMaxHeight(0.2F, 0.9F));
Biomes.lushSwamp = Optional.of((new BiomeGenLushSwamp(BOPConfiguration.lushSwampID)).setColor(522674).setBiomeName("Lush Swamp").func_76733_a(9154376).setMinMaxHeight(0.1F, 0.4F).setTemperatureRainfall(0.7F, 1.0F));
Biomes.lushSwamp = Optional.of((new BiomeGenLushSwamp(BOPConfiguration.lushSwampID)).setColor(522674).setBiomeName("Lush Swamp").func_76733_a(9154376).setMinMaxHeight(0.2F, 0.3F).setTemperatureRainfall(0.7F, 1.0F));
Biomes.mangrove = Optional.of((new BiomeGenMangrove(BOPConfiguration.mangroveID)).setColor(16440917).setBiomeName("Mangrove").setMinMaxHeight(0.1F, 0.3F).setTemperatureRainfall(0.8F, 0.9F));
Biomes.mapleWoods = Optional.of((new BiomeGenMapleWoods(BOPConfiguration.mapleWoodsID)).setColor(747097).setBiomeName("Maple Woods").func_76733_a(5159473).setTemperatureRainfall(0.2F, 0.8F).setMinMaxHeight(0.3F, 0.6F));
Biomes.marsh = Optional.of((new BiomeGenMarsh(BOPConfiguration.marshID)).setColor(10486015).setBiomeName("Marsh").setMinMaxHeight(-0.5F, 0.0F).setTemperatureRainfall(0.5F, 0.9F));
@ -115,7 +115,7 @@ public class BOPBiomes {
Biomes.meadowForest = Optional.of((new BiomeGenMeadowForest(BOPConfiguration.meadowForestID)).setColor(9286496).setBiomeName("Meadow Forest").setTemperatureRainfall(0.7F, 0.7F));
Biomes.mesa = Optional.of((new BiomeGenMesa(BOPConfiguration.mesaID)).setColor(16421912).setBiomeName("Mesa").setDisableRain().setTemperatureRainfall(2.0F, 0.0F).setMinMaxHeight(0.4F, 2.0F));
Biomes.moor = Optional.of((new BiomeGenMoor(BOPConfiguration.moorID)).setColor(16421912).setBiomeName("Moor").setTemperatureRainfall(0.5F, 1.0F).setMinMaxHeight(0.7F, 0.8F));
Biomes.mountain = Optional.of((new BiomeGenMountain(BOPConfiguration.mountainID)).setColor(14090235).setBiomeName("Mountain").setTemperatureRainfall(0.5F, 0.1F).setMinMaxHeight(1.2F, 1.2F).setMinMaxHeight(0.2F, 0.4F));
Biomes.mountain = Optional.of((new BiomeGenMountain(BOPConfiguration.mountainID)).setColor(14090235).setBiomeName("Mountain").setTemperatureRainfall(0.5F, 0.1F).setMinMaxHeight(1.2F, 1.2F).setMinMaxHeight(0.2F, 0.5F));
Biomes.mysticGrove = Optional.of((new BiomeGenMysticGrove(BOPConfiguration.mysticGroveID)).setColor(353825).setBiomeName("Mystic Grove").setDisableRain().func_76733_a(5159473).setTemperatureRainfall(0.9F, 1.0F));
Biomes.netherBase = Optional.of((new BiomeGenNetherBase(BOPConfiguration.netherBaseID)).setColor(16711680).setBiomeName("Nether").setDisableRain().setTemperatureRainfall(2.0F, 0.0F));
@ -149,6 +149,7 @@ public class BOPBiomes {
Biomes.redwoodForest = Optional.of((new BiomeGenRedwoodForest(BOPConfiguration.redwoodForestID)).setColor(747097).setBiomeName("Redwood Forest").func_76733_a(5159473).setTemperatureRainfall(0.8F, 0.4F).setMinMaxHeight(0.3F, 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.3F, 0.4F));
Biomes.savannaPlateau = Optional.of((new BiomeGenSavannaPlateau(BOPConfiguration.savannaPlateauID)).setColor(9286496).setBiomeName("Savanna Plateau").setTemperatureRainfall(1.5F, 0.1F).setMinMaxHeight(0.9F, 0.9F));
Biomes.scrubland = Optional.of((new BiomeGenScrubland(BOPConfiguration.scrublandID)).setColor(9286496).setBiomeName("Scrubland").setTemperatureRainfall(1.2F, 0.0F).setMinMaxHeight(0.3F, 0.5F));
Biomes.seasonalForest = Optional.of((new BiomeGenSeasonalForest(BOPConfiguration.seasonalForestID)).setColor(353825).setBiomeName("Seasonal Forest").func_76733_a(5159473).setTemperatureRainfall(0.7F, 0.8F).setMinMaxHeight(0.3F, 0.7F));
Biomes.seasonalSpruceForest = Optional.of((new BiomeGenSeasonalSpruceForest(BOPConfiguration.seasonalSpruceForestID)).setColor(353825).setBiomeName("Seasonal Spruce Forest").func_76733_a(5159473).setTemperatureRainfall(0.7F, 0.8F).setMinMaxHeight(0.3F, 0.7F));
@ -173,7 +174,7 @@ public class BOPBiomes {
Biomes.plainsNew = Optional.of((new BiomeGenPlainsNew(BOPConfiguration.plainsNewID)).setColor(9286496).setBiomeName("Plains").setTemperatureRainfall(0.8F, 0.4F));
Biomes.desertNew = Optional.of((new BiomeGenDesertNew(BOPConfiguration.desertNewID)).setColor(16421912).setBiomeName("Desert").setDisableRain().setTemperatureRainfall(2.0F, 0.0F).setMinMaxHeight(0.2F, 0.3F));
Biomes.extremeHillsNew = Optional.of((new BiomeGenHillsNew(BOPConfiguration.extremeHillsNewID)).setColor(6316128).setBiomeName("Extreme Hills").setMinMaxHeight(0.3F, 5.0F).setTemperatureRainfall(0.2F, 0.3F));
Biomes.extremeHillsNew = Optional.of((new BiomeGenHillsNew(BOPConfiguration.extremeHillsNewID)).setColor(6316128).setBiomeName("Extreme Hills").setMinMaxHeight(1.0F, 2.0F).setTemperatureRainfall(0.2F, 0.3F));
Biomes.forestNew = Optional.of((new BiomeGenForestNew(BOPConfiguration.forestNewID)).setColor(353825).setBiomeName("Forest").func_76733_a(5159473).setTemperatureRainfall(0.7F, 0.8F));
Biomes.taigaNew = Optional.of((new BiomeGenTaigaNew(BOPConfiguration.taigaNewID)).setColor(747097).setBiomeName("Taiga").func_76733_a(5159473).setEnableSnow().setTemperatureRainfall(0.05F, 0.8F).setMinMaxHeight(0.3F, 0.5F));
Biomes.swamplandNew = Optional.of((new BiomeGenSwampNew(BOPConfiguration.swamplandNewID)).setColor(522674).setBiomeName("Swampland").func_76733_a(9154376).setMinMaxHeight(0.1F, 0.3F).setTemperatureRainfall(0.8F, 0.9F));
@ -273,7 +274,8 @@ public class BOPBiomes {
BiomeDictionary.registerBiomeType(Biomes.rainforest.get(), Type.JUNGLE, Type.HILLS, Type.FOREST);
BiomeDictionary.registerBiomeType(Biomes.redwoodForest.get(), Type.FOREST);
BiomeDictionary.registerBiomeType(Biomes.sacredSprings.get(), Type.MOUNTAIN, Type.FOREST);
BiomeDictionary.registerBiomeType(Biomes.savanna.get(), Type.DESERT);
BiomeDictionary.registerBiomeType(Biomes.savanna.get(), Type.DESERT, Type.PLAINS);
BiomeDictionary.registerBiomeType(Biomes.savannaPlateau.get(), Type.DESERT, Type.PLAINS, Type.HILLS);
BiomeDictionary.registerBiomeType(Biomes.scrubland.get(), Type.DESERT, Type.PLAINS);
BiomeDictionary.registerBiomeType(Biomes.seasonalForest.get(), Type.FOREST);

View file

@ -360,6 +360,7 @@ public class BOPConfiguration {
public static int reefID;
public static int sacredSpringsID;
public static int savannaID;
public static int savannaPlateauID;
public static int scrublandID;
public static int seasonalForestID;
public static int seasonalSpruceForestID;
@ -877,6 +878,7 @@ public class BOPConfiguration {
//23-79 ExtraBiomesXL
savannaPlateauID = config.get("Biome IDs", "Savanna Plateau (Sub-Biome) ID", 39).getInt();
fieldForestID = config.get("Biome IDs", "Forested Field (Sub-Biome) ID", 40).getInt();
seasonalSpruceForestID = config.get("Biome IDs", "Seasonal Spruce Forest (Sub-Biome) ID", 41).getInt();
alpsBaseID = config.get("Biome IDs", "Alps Forest (Sub-Biome) ID", 42).getInt();

View file

@ -120,7 +120,7 @@ public class ItemBOPFood extends ItemFood
for (Field f : fields)
{
if (f.getName().equals("foodLevel") || f.getName().equals("field_71100_bB"))
if (f.getName().equals("foodLevel") || f.getName().equals("bB"))
{
flfield = f;
break;
@ -141,7 +141,7 @@ public class ItemBOPFood extends ItemFood
for (Field f : fields)
{
if (f.getName().equals("foodSaturationLevel") || f.getName().equals("field_75125_b"))
if (f.getName().equals("foodSaturationLevel") || f.getName().equals("b"))
{
slfield = f;
break;

View file

@ -41,6 +41,7 @@ public class BiomeLayerSub extends BiomeLayer
if (k1 == Biomes.alps.get().biomeID && nextInt(3) == 0) { l1 = Biomes.alpsBase.get().biomeID; }
if (k1 == Biomes.seasonalForest.get().biomeID && nextInt(2) == 0) { l1 = Biomes.seasonalSpruceForest.get().biomeID; }
if (k1 == Biomes.field.get().biomeID && nextInt(2) == 0) { l1 = Biomes.fieldForest.get().biomeID; }
if (k1 == Biomes.savanna.get().biomeID && nextInt(4) == 0) { l1 = Biomes.savannaPlateau.get().biomeID; }
//if (k1 == BiomeGenBase.ocean.biomeID && nextInt(2) == 0) { l1 = Biomes.tropics.get().biomeID; }
//if (k1 == BiomeGenBase.ocean.biomeID && nextInt(3) == 0) { l1 = Biomes.volcano.get().biomeID; }