Also register configured origin carver

This commit is contained in:
Adubbz 2020-09-24 14:59:54 +10:00
parent 376348eb9f
commit 9af3b6f06c
2 changed files with 28 additions and 1 deletions

View File

@ -8,6 +8,7 @@
package biomesoplenty.common.biome.overworld;
import biomesoplenty.common.biome.BiomeTemplate;
import biomesoplenty.common.world.gen.carver.BOPConfiguredCarvers;
import biomesoplenty.common.world.gen.carver.BOPWorldCarvers;
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
import biomesoplenty.common.world.gen.feature.BOPFeatures;
@ -41,7 +42,7 @@ public class OriginHillsBiome extends BiomeTemplate
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(BOPSurfaceBuilders.ORIGIN_HILLS, BOPSurfaceBuilders.ORIGIN_GRASS_SURFACE));
// Underground
builder.addCarver(GenerationStage.Carving.AIR, BOPWorldCarvers.ORIGIN_CAVE.configured(new ProbabilityConfig(0.14285715F)));
builder.addCarver(GenerationStage.Carving.AIR, BOPConfiguredCarvers.ORIGIN_CAVE);
DefaultBiomeFeatures.addDefaultMonsterRoom(builder);
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Features.DISK_CLAY);

View File

@ -0,0 +1,26 @@
/*******************************************************************************
* Copyright 2014-2020, the Biomes O' Plenty Team
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
*
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package biomesoplenty.common.world.gen.carver;
import biomesoplenty.core.BiomesOPlenty;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.registry.WorldGenRegistries;
import net.minecraft.world.gen.carver.ConfiguredCarver;
import net.minecraft.world.gen.carver.ICarverConfig;
import net.minecraft.world.gen.carver.WorldCarver;
import net.minecraft.world.gen.feature.ProbabilityConfig;
public class BOPConfiguredCarvers
{
public static final ConfiguredCarver<ProbabilityConfig> ORIGIN_CAVE = register("origin_cave", BOPWorldCarvers.ORIGIN_CAVE.configured(new ProbabilityConfig(0.14285715F)));
private static <WC extends ICarverConfig> ConfiguredCarver<WC> register(String key, ConfiguredCarver<WC> carver)
{
return WorldGenRegistries.register(WorldGenRegistries.CONFIGURED_CARVER, new ResourceLocation(BiomesOPlenty.MOD_ID, key), carver);
}
}