Fixed ocean generation.
Added new Terrain Gen option.
This commit is contained in:
parent
05fc6e2f2e
commit
69cd689352
4 changed files with 28 additions and 20 deletions
|
@ -26,6 +26,7 @@ public class BOPConfigurationTerrainGen
|
||||||
public static boolean burningBlossomGen;
|
public static boolean burningBlossomGen;
|
||||||
|
|
||||||
public static int villageDistance;
|
public static int villageDistance;
|
||||||
|
public static int landmassPercentage;
|
||||||
|
|
||||||
// Village biomes
|
// Village biomes
|
||||||
public static boolean alpsVillage;
|
public static boolean alpsVillage;
|
||||||
|
@ -141,6 +142,8 @@ public class BOPConfigurationTerrainGen
|
||||||
villageDistance = 8;
|
villageDistance = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
landmassPercentage = config.get("Biomes O\' Plenty World Type Settings", "Landmass Percentage", 10, "In Vanilla it is set to 10. Takes values from 0 to 100.").getInt();
|
||||||
|
|
||||||
// Biomes with villages
|
// Biomes with villages
|
||||||
alpsVillage = config.get("Allow Villages", "Alps", false).getBoolean(false);
|
alpsVillage = config.get("Allow Villages", "Alps", false).getBoolean(false);
|
||||||
arcticVillage = config.get("Allow Villages", "Arctic", true).getBoolean(false);
|
arcticVillage = config.get("Allow Villages", "Arctic", true).getBoolean(false);
|
||||||
|
|
|
@ -83,13 +83,6 @@ public class BiomeLayerBiomes extends BiomeLayer
|
||||||
netherBiomes.add(Biomes.netherBone.get());
|
netherBiomes.add(Biomes.netherBone.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Biomes.netherBlood.isPresent())
|
|
||||||
{
|
|
||||||
if (BOPConfigurationBiomeGen.bloodyHeapGen)
|
|
||||||
{
|
|
||||||
netherBiomes.add(Biomes.netherBlood.get());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Biomes.netherBiomes.size() > 0)
|
if (Biomes.netherBiomes.size() > 0)
|
||||||
{
|
{
|
||||||
netherBiomes.addAll(Biomes.netherBiomes);
|
netherBiomes.addAll(Biomes.netherBiomes);
|
||||||
|
@ -116,7 +109,7 @@ public class BiomeLayerBiomes extends BiomeLayer
|
||||||
int[] var5 = this.parent.getInts(par1, par2, par3, par4);
|
int[] var5 = this.parent.getInts(par1, par2, par3, par4);
|
||||||
int[] var6 = IntCache.getIntCache(par3 * par4);
|
int[] var6 = IntCache.getIntCache(par3 * par4);
|
||||||
|
|
||||||
boolean abyss = Biomes.oceanCoral.isPresent();
|
boolean abyss = Biomes.oceanAbyss.isPresent();
|
||||||
boolean coral = Biomes.oceanCoral.isPresent();
|
boolean coral = Biomes.oceanCoral.isPresent();
|
||||||
boolean kelp = Biomes.oceanKelp.isPresent();
|
boolean kelp = Biomes.oceanKelp.isPresent();
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,14 @@ package biomesoplenty.world.layer;
|
||||||
import net.minecraft.world.gen.layer.IntCache;
|
import net.minecraft.world.gen.layer.IntCache;
|
||||||
import biomesoplenty.api.Biomes;
|
import biomesoplenty.api.Biomes;
|
||||||
import biomesoplenty.configuration.configfile.BOPConfigurationBiomeGen;
|
import biomesoplenty.configuration.configfile.BOPConfigurationBiomeGen;
|
||||||
|
import biomesoplenty.configuration.configfile.BOPConfigurationTerrainGen;
|
||||||
|
|
||||||
public class BiomeLayerCreate extends BiomeLayer
|
public class BiomeLayerCreate extends BiomeLayer
|
||||||
{
|
{
|
||||||
|
final private int ABYSS_CHANCE = 2;
|
||||||
|
final private int CORAL_CHANCE = 5;
|
||||||
|
final private int KELP_CHANCE = 5;
|
||||||
|
|
||||||
public BiomeLayerCreate(long par1, boolean o)
|
public BiomeLayerCreate(long par1, boolean o)
|
||||||
{
|
{
|
||||||
super(par1);
|
super(par1);
|
||||||
|
@ -28,10 +33,19 @@ public class BiomeLayerCreate extends BiomeLayer
|
||||||
this.initChunkSeed(par1 + var7, par2 + var6);
|
this.initChunkSeed(par1 + var7, par2 + var6);
|
||||||
if(ocean)
|
if(ocean)
|
||||||
{
|
{
|
||||||
if(abyss) { var5[var7 + var6 * par3] = this.nextInt(50) == 0 ? 1 : Biomes.oceanAbyss.get().biomeID; }
|
if (this.nextInt(100) < BOPConfigurationTerrainGen.landmassPercentage)
|
||||||
else if(coral) { var5[var7 + var6 * par3] = this.nextInt(20) == 0 ? 1 : Biomes.oceanCoral.get().biomeID; }
|
{
|
||||||
else if(kelp) { var5[var7 + var6 * par3] = this.nextInt(20) == 0 ? 1 : Biomes.oceanKelp.get().biomeID; }
|
var5[var7 + var6 * par3] = 1;
|
||||||
else { var5[var7 + var6 * par3] = this.nextInt(10) == 0 ? 1 : 0;}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int oceanType = 0;
|
||||||
|
if (abyss && this.nextInt(100) < ABYSS_CHANCE) oceanType = Biomes.oceanAbyss.get().biomeID;
|
||||||
|
else if (coral && this.nextInt(100) < CORAL_CHANCE) oceanType = Biomes.oceanCoral.get().biomeID;
|
||||||
|
else if (kelp && this.nextInt(100) < KELP_CHANCE) oceanType = Biomes.oceanKelp.get().biomeID;
|
||||||
|
|
||||||
|
var5[var7 + var6 * par3] = oceanType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -40,13 +54,10 @@ public class BiomeLayerCreate extends BiomeLayer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ocean)
|
|
||||||
{
|
|
||||||
if (par1 > -par3 && par1 <= 0 && par2 > -par4 && par2 <= 0)
|
if (par1 > -par3 && par1 <= 0 && par2 > -par4 && par2 <= 0)
|
||||||
{
|
{
|
||||||
var5[-par1 + -par2 * par3] = 1;
|
var5[-par1 + -par2 * par3] = 1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return var5;
|
return var5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package biomesoplenty.world.layer;
|
package biomesoplenty.world.layer;
|
||||||
|
|
||||||
|
import biomesoplenty.api.Biomes;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.gen.layer.IntCache;
|
import net.minecraft.world.gen.layer.IntCache;
|
||||||
|
|
||||||
|
@ -32,7 +33,7 @@ public class BiomeLayerRiverMix extends BiomeLayer
|
||||||
|
|
||||||
for (int var8 = 0; var8 < par3 * par4; ++var8)
|
for (int var8 = 0; var8 < par3 * par4; ++var8)
|
||||||
{
|
{
|
||||||
if (var5[var8] == BiomeGenBase.ocean.biomeID)
|
if (var5[var8] == BiomeGenBase.ocean.biomeID || var5[var8] == Biomes.oceanAbyss.get().biomeID || var5[var8] == Biomes.oceanCoral.get().biomeID || var5[var8] == Biomes.oceanKelp.get().biomeID)
|
||||||
{
|
{
|
||||||
var7[var8] = var5[var8];
|
var7[var8] = var5[var8];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue