Redwood tree start angle & city density option

This commit is contained in:
paulevsGitch 2021-01-13 16:46:25 +03:00
parent 7aa441171c
commit b4ca488e66
4 changed files with 58 additions and 3 deletions

View file

@ -14,6 +14,7 @@ public class GeneratorOptions {
private static boolean newGenerator;
private static boolean noRingVoid;
private static boolean generateCentralIsland;
private static int endCityFailChance;
public static void init() {
biomeSizeLand = Configs.GENERATOR_CONFIG.getInt("biomeMap", "biomeSizeLand", 256);
@ -27,6 +28,7 @@ public class GeneratorOptions {
newGenerator = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "useNewGenerator", false);
noRingVoid = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "noRingVoid", false);
generateCentralIsland = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "generateCentralIsland", false);
endCityFailChance = Configs.GENERATOR_CONFIG.getInt("customGenerator", "endCityFailChance", 5);
}
public static int getBiomeSizeLand() {
@ -72,4 +74,8 @@ public class GeneratorOptions {
public static boolean hasCentralIsland() {
return generateCentralIsland;
}
public static int getEndCityFailChance() {
return endCityFailChance;
}
}

View file

@ -81,8 +81,13 @@ public class IslandLayer {
private SDF getIsland(BlockPos pos) {
SDF island = islands.get(pos);
if (island == null) {
RANDOM.setSeed(getSeed(pos.getX(), pos.getZ()));
island = new SDFScale().setScale(RANDOM.nextFloat() + 0.5F).setSource(ISLAND);
if (pos.getX() == 0 && pos.getZ() == 0) {
island = new SDFScale().setScale(1.3F).setSource(ISLAND);
}
else {
RANDOM.setSeed(getSeed(pos.getX(), pos.getZ()));
island = new SDFScale().setScale(RANDOM.nextFloat() + 0.5F).setSource(ISLAND);
}
islands.put(pos, island);
}
return island;