Our genlayer stack is now accessible

This commit is contained in:
Adubbz 2016-04-23 11:54:47 +10:00
parent 57ccd700b2
commit 1ddfc8a36e
2 changed files with 12 additions and 6 deletions

View file

@ -7,7 +7,12 @@
******************************************************************************/
package biomesoplenty.api.generation;
import net.minecraft.world.gen.layer.GenLayer;
public class Generators
{
public static IGeneratorRegistry registry;
public static GenLayer biomeGenLayer;
public static GenLayer biomeIndexLayer;
}

View file

@ -10,6 +10,7 @@ package biomesoplenty.common.world;
import biomesoplenty.api.biome.BOPBiomes;
import biomesoplenty.api.biome.IExtendedBiome;
import biomesoplenty.api.generation.Generators;
import biomesoplenty.common.util.biome.BiomeUtils;
import biomesoplenty.common.world.BOPWorldSettings.LandMassScheme;
import biomesoplenty.common.world.layer.GenLayerBiomeBOP;
@ -75,10 +76,10 @@ public class BiomeProviderBOP extends BiomeProvider
}
// set up all the gen layers
GenLayer[] agenlayer = setupBOPGenLayers(seed, (WorldTypeBOP)worldType, settings);
GenLayer[] agenlayer = setupBOPGenLayers(seed, settings);
agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer);
this.genBiomes = agenlayer[0];
this.biomeIndexLayer = agenlayer[1];
this.genBiomes = Generators.biomeGenLayer = agenlayer[0];
this.biomeIndexLayer = Generators.biomeIndexLayer = agenlayer[1];
}
public BiomeProviderBOP(World world)
@ -171,7 +172,7 @@ public class BiomeProviderBOP extends BiomeProvider
return climate;
}
public static GenLayer allocateBiomes(long worldSeed, WorldTypeBOP worldType, BOPWorldSettings settings, GenLayer mainBranch, GenLayer subBiomesInit, GenLayer climateLayer)
public static GenLayer allocateBiomes(long worldSeed, BOPWorldSettings settings, GenLayer mainBranch, GenLayer subBiomesInit, GenLayer climateLayer)
{
// allocate the basic biomes
GenLayer biomesLayer = new GenLayerBiomeBOP(200L, mainBranch, climateLayer, settings);
@ -223,7 +224,7 @@ public class BiomeProviderBOP extends BiomeProvider
}
public static GenLayer[] setupBOPGenLayers(long worldSeed, WorldTypeBOP worldType, BOPWorldSettings settings)
public static GenLayer[] setupBOPGenLayers(long worldSeed, BOPWorldSettings settings)
{
int biomeSize = settings.biomeSize.getValue();
@ -244,7 +245,7 @@ public class BiomeProviderBOP extends BiomeProvider
GenLayer climateLayer = climateLayer(settings, worldSeed);
// allocate the biomes
mainBranch = allocateBiomes(worldSeed, worldType, settings, mainBranch, riversAndSubBiomesInit, climateLayer);
mainBranch = allocateBiomes(worldSeed, settings, mainBranch, riversAndSubBiomesInit, climateLayer);
// do a bit more zooming, depending on biomeSize
//mainBranch = new GenLayerRareBiome(1001L, mainBranch); - sunflower plains I think