Browse Source

remove caves from biomes

Kajetan Johannes Hammerle 4 years ago
parent
commit
354e7f2546
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/main/java/me/km/world/ModWorldGeneration.java

+ 5 - 0
src/main/java/me/km/world/ModWorldGeneration.java

@@ -4,6 +4,7 @@ import me.km.blocks.ModBlocks;
 import net.minecraft.block.Block;
 import net.minecraft.block.Blocks;
 import net.minecraft.world.biome.Biome;
+import net.minecraft.world.biome.NetherBiome;
 import net.minecraft.world.gen.GenerationStage;
 import net.minecraft.world.gen.feature.ConfiguredFeature;
 import net.minecraft.world.gen.feature.DecoratedFeatureConfig;
@@ -17,6 +18,10 @@ public class ModWorldGeneration {
     public static void register() {
         // search for all biomes which generate ore
         for(Biome biome : ForgeRegistries.BIOMES.getValues()) {
+            if(!(biome instanceof NetherBiome)) {
+                biome.getCarvers(GenerationStage.Carving.AIR).clear();
+                biome.getCarvers(GenerationStage.Carving.LIQUID).clear();
+            }
             for(ConfiguredFeature f : biome.getFeatures(GenerationStage.Decoration.UNDERGROUND_ORES)) {
                 if(!(f.config instanceof DecoratedFeatureConfig)) {
                     continue;