diff --git a/src/main/java/com/progwml6/natura/common/config/Config.java b/src/main/java/com/progwml6/natura/common/config/Config.java index 24699704..44a159f4 100644 --- a/src/main/java/com/progwml6/natura/common/config/Config.java +++ b/src/main/java/com/progwml6/natura/common/config/Config.java @@ -214,10 +214,10 @@ public static boolean syncConfig() // Berries End // Cloud Start - cloudBlacklist = configFile.get(WORLDGEN, "dimension blacklist(clouds)", cloudBlacklist).getIntList(); - darkCloudBlacklist = configFile.get(WORLDGEN, "dimension blacklist(dark clouds)", darkCloudBlacklist).getIntList(); - ashBlacklist = configFile.get(WORLDGEN, "dimension blacklist(ash clouds)", ashBlacklist).getIntList(); - sulfurCloudBlacklist = configFile.get(WORLDGEN, "dimension blacklist(sulfur clouds)", sulfurCloudBlacklist).getIntList(); + cloudWhitelist = configFile.get(WORLDGEN, "dimension blacklist(clouds)", cloudWhitelist).getIntList(); + darkCloudWhitelist = configFile.get(WORLDGEN, "dimension blacklist(dark clouds)", darkCloudWhitelist).getIntList(); + ashWhitelist = configFile.get(WORLDGEN, "dimension blacklist(ash clouds)", ashWhitelist).getIntList(); + sulfurCloudWhitelist = configFile.get(WORLDGEN, "dimension blacklist(sulfur clouds)", sulfurCloudWhitelist).getIntList(); cloudSpawnRarity = configFile.get(WORLDGEN, "Cloud Spawn Rarity", cloudSpawnRarity).getInt(cloudSpawnRarity); cloudSpawnHeight = configFile.get(WORLDGEN, "Cloud Spawn Height", cloudSpawnHeight).getInt(cloudSpawnHeight); @@ -268,10 +268,10 @@ public static boolean syncConfig() public static boolean generateAshClouds = true; public static boolean generateDarkClouds = true; - public static int[] cloudBlacklist = new int[] {}; - public static int[] darkCloudBlacklist = new int[] {}; - public static int[] ashBlacklist = new int[] {}; - public static int[] sulfurCloudBlacklist = new int[] {}; + public static int[] cloudWhitelist = new int[] {0}; + public static int[] darkCloudWhitelist = new int[] {1}; + public static int[] ashWhitelist = new int[] {-1}; + public static int[] sulfurCloudWhitelist = new int[] {-1}; public static boolean enableCloudBlocks = false; public static int cloudSpawnRarity = 10; diff --git a/src/main/java/com/progwml6/natura/world/worldgen/CloudGenerator.java b/src/main/java/com/progwml6/natura/world/worldgen/CloudGenerator.java index 2133af1c..a856f946 100644 --- a/src/main/java/com/progwml6/natura/world/worldgen/CloudGenerator.java +++ b/src/main/java/com/progwml6/natura/world/worldgen/CloudGenerator.java @@ -106,7 +106,7 @@ public void generateOverworld(Random random, int chunkX, int chunkZ, World world Biome biome = world.getChunk(chunkPos).getBiome(chunkPos, world.getBiomeProvider()); - if (Config.generateOverworldClouds && biome.getRainfall() > 0.15f && random.nextInt(Config.cloudSpawnRarity) == 0 && world.provider.getDimension() != 1 && this.shouldGenerateInDimension(world.provider.getDimension(), Config.cloudBlacklist)) + if (Config.generateOverworldClouds && biome.getRainfall() > 0.15f && random.nextInt(Config.cloudSpawnRarity) == 0 && this.shouldGenerateInDimension(world.provider.getDimension(), Config.cloudWhitelist)) { xSpawn = xPos + random.nextInt(16); ySpawn = random.nextInt(Config.cloudSpawnRange) + Config.cloudSpawnHeight; @@ -147,7 +147,7 @@ public void generateNether(Random random, int chunkX, int chunkZ, World world) if (world.provider.doesWaterVaporize()) { - if (Config.generateAshClouds && random.nextInt(Config.ashSpawnRarity) == 0 && this.shouldGenerateInDimension(world.provider.getDimension(), Config.ashBlacklist)) + if (Config.generateAshClouds && random.nextInt(Config.ashSpawnRarity) == 0 && this.shouldGenerateInDimension(world.provider.getDimension(), Config.ashWhitelist)) { xSpawn = xPos + random.nextInt(16); ySpawn = random.nextInt(Config.ashSpawnRange) + Config.ashSpawnHeight; @@ -178,7 +178,7 @@ else if (size < 11) } } - if (Config.generateSulfurClouds && random.nextInt(Config.sulfurSpawnRarity) == 0 && this.shouldGenerateInDimension(world.provider.getDimension(), Config.sulfurCloudBlacklist)) + if (Config.generateSulfurClouds && random.nextInt(Config.sulfurSpawnRarity) == 0 && this.shouldGenerateInDimension(world.provider.getDimension(), Config.sulfurCloudWhitelist)) { xSpawn = xPos + random.nextInt(16); ySpawn = random.nextInt(Config.sulfurSpawnRange) + Config.sulfurSpawnHeight; @@ -226,7 +226,7 @@ public void generateEnd(Random random, int chunkX, int chunkZ, World world) Biome biome = world.getChunk(chunkPos).getBiome(chunkPos, world.getBiomeProvider()); - if (Config.generateDarkClouds && biome == Biomes.SKY && world.provider.getDimension() == 1 && random.nextInt(4) == 0 && this.shouldGenerateInDimension(world.provider.getDimension(), Config.darkCloudBlacklist)) + if (Config.generateDarkClouds && biome == Biomes.SKY && random.nextInt(4) == 0 && this.shouldGenerateInDimension(world.provider.getDimension(), Config.darkCloudWhitelist)) { xSpawn = xPos + random.nextInt(16); zSpawn = zPos + random.nextInt(16); @@ -264,10 +264,10 @@ public boolean shouldGenerateInDimension(int dimension, int[] configSetting) { if (dimension == dimensionId) { - return false; + return true; } } - return true; + return false; } }