Our genlayer stack is now accessible
This commit is contained in:
parent
57ccd700b2
commit
1ddfc8a36e
2 changed files with 12 additions and 6 deletions
|
@ -7,7 +7,12 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package biomesoplenty.api.generation;
|
package biomesoplenty.api.generation;
|
||||||
|
|
||||||
|
import net.minecraft.world.gen.layer.GenLayer;
|
||||||
|
|
||||||
public class Generators
|
public class Generators
|
||||||
{
|
{
|
||||||
public static IGeneratorRegistry registry;
|
public static IGeneratorRegistry registry;
|
||||||
|
|
||||||
|
public static GenLayer biomeGenLayer;
|
||||||
|
public static GenLayer biomeIndexLayer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ package biomesoplenty.common.world;
|
||||||
|
|
||||||
import biomesoplenty.api.biome.BOPBiomes;
|
import biomesoplenty.api.biome.BOPBiomes;
|
||||||
import biomesoplenty.api.biome.IExtendedBiome;
|
import biomesoplenty.api.biome.IExtendedBiome;
|
||||||
|
import biomesoplenty.api.generation.Generators;
|
||||||
import biomesoplenty.common.util.biome.BiomeUtils;
|
import biomesoplenty.common.util.biome.BiomeUtils;
|
||||||
import biomesoplenty.common.world.BOPWorldSettings.LandMassScheme;
|
import biomesoplenty.common.world.BOPWorldSettings.LandMassScheme;
|
||||||
import biomesoplenty.common.world.layer.GenLayerBiomeBOP;
|
import biomesoplenty.common.world.layer.GenLayerBiomeBOP;
|
||||||
|
@ -75,10 +76,10 @@ public class BiomeProviderBOP extends BiomeProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up all the gen layers
|
// set up all the gen layers
|
||||||
GenLayer[] agenlayer = setupBOPGenLayers(seed, (WorldTypeBOP)worldType, settings);
|
GenLayer[] agenlayer = setupBOPGenLayers(seed, settings);
|
||||||
agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer);
|
agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer);
|
||||||
this.genBiomes = agenlayer[0];
|
this.genBiomes = Generators.biomeGenLayer = agenlayer[0];
|
||||||
this.biomeIndexLayer = agenlayer[1];
|
this.biomeIndexLayer = Generators.biomeIndexLayer = agenlayer[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
public BiomeProviderBOP(World world)
|
public BiomeProviderBOP(World world)
|
||||||
|
@ -171,7 +172,7 @@ public class BiomeProviderBOP extends BiomeProvider
|
||||||
return climate;
|
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
|
// allocate the basic biomes
|
||||||
GenLayer biomesLayer = new GenLayerBiomeBOP(200L, mainBranch, climateLayer, settings);
|
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();
|
int biomeSize = settings.biomeSize.getValue();
|
||||||
|
@ -244,7 +245,7 @@ public class BiomeProviderBOP extends BiomeProvider
|
||||||
GenLayer climateLayer = climateLayer(settings, worldSeed);
|
GenLayer climateLayer = climateLayer(settings, worldSeed);
|
||||||
|
|
||||||
// allocate the biomes
|
// 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
|
// do a bit more zooming, depending on biomeSize
|
||||||
//mainBranch = new GenLayerRareBiome(1001L, mainBranch); - sunflower plains I think
|
//mainBranch = new GenLayerRareBiome(1001L, mainBranch); - sunflower plains I think
|
||||||
|
|
Loading…
Reference in a new issue