Terrain generator fix

This commit is contained in:
paulevsGitch 2021-04-04 12:01:37 +03:00
parent 86a57a1bd8
commit f76ca1144d
3 changed files with 7 additions and 6 deletions

View file

@ -35,10 +35,11 @@ public abstract class NoiseChunkGeneratorMixin extends ChunkGenerator {
@Inject(method = "sampleNoiseColumn([DII)V", at = @At("HEAD"), cancellable = true, allow = 2)
private void beSampleNoiseColumn(double[] buffer, int x, int z, CallbackInfo info) {
if (GeneratorOptions.useNewGenerator() && settings.get().equals(ChunkGeneratorSettings.END)) {
if (TerrainGenerator.canGenerate(x, z)) {
//System.out.println(TerrainGenerator.canGenerate(x, z));
//if (TerrainGenerator.canGenerate(x, z)) {
TerrainGenerator.fillTerrainDensity(buffer, x, z, getBiomeSource());
info.cancel();
}
//}
}
}
}

View file

@ -38,7 +38,7 @@ public class GeneratorOptions {
removeChorusFromVanillaBiomes = Configs.GENERATOR_CONFIG.getBoolean("chorusPlant", "removeChorusFromVanillaBiomes", true);
newGenerator = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "useNewGenerator", true);
noRingVoid = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "noRingVoid", false);
generateCentralIsland = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "generateCentralIsland", false);
generateCentralIsland = Configs.GENERATOR_CONFIG.getBoolean("customGenerator", "generateCentralIsland", true);
endCityFailChance = Configs.GENERATOR_CONFIG.getInt("customGenerator", "endCityFailChance", 5);
generateObsidianPlatform = Configs.GENERATOR_CONFIG.getBooleanRoot("generateObsidianPlatform", true);
bigOptions = new LayerOptions("customGenerator.layers.bigIslands", Configs.GENERATOR_CONFIG, 300, 200, 70, 10, false);

View file

@ -26,9 +26,9 @@ public class TerrainGenerator {
private static OpenSimplexNoise noise1;
private static OpenSimplexNoise noise2;
public static boolean canGenerate(int x, int z) {
return GeneratorOptions.noRingVoid()/* || (long) x + (long) z > CENTER*/;
}
/*public static boolean canGenerate(int x, int z) {
return GeneratorOptions.noRingVoid() || (long) x + (long) z > CENTER;
}*/
public static void initNoise(long seed) {
Random random = new Random(seed);