use of net.minecraftforge.common.world.BiomeGenerationSettingsBuilder in project BluePower by Qmunity.
the class WorldGenFlowers method onBiomeLoad.
@SubscribeEvent
public void onBiomeLoad(BiomeLoadingEvent event) {
int n = getConfigAmount(event.getName());
if (n > 0) {
BiomeGenerationSettingsBuilder generation = event.getGeneration();
ConfiguredFeature<?, ?> feature = WorldGenRegistries.CONFIGURED_FEATURE.get(new ResourceLocation("bluepower:" + Refs.INDIGOFLOWER_NAME + n));
if (feature != null)
generation.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, feature);
}
}
use of net.minecraftforge.common.world.BiomeGenerationSettingsBuilder in project Geolosys by oitsjustjose.
the class PlutonRegistry method onBiomesLoaded.
@SubscribeEvent
public void onBiomesLoaded(BiomeLoadingEvent evt) {
BiomeGenerationSettingsBuilder settings = evt.getGeneration();
// Removes vanilla ores
if (CommonConfig.REMOVE_VANILLA_ORES.get()) {
for (GenerationStage.Decoration deco : decorations) {
FeatureUtils.destroyFeature(settings.getFeatures(deco), OreRemover.filterFeatures(settings.getFeatures(deco)));
}
}
DepositFeature o = new DepositFeature(NoFeatureConfig.CODEC);
settings.withFeature(GenerationStage.Decoration.UNDERGROUND_ORES, o.withConfiguration(NoFeatureConfig.NO_FEATURE_CONFIG));
}
use of net.minecraftforge.common.world.BiomeGenerationSettingsBuilder in project Tropicraft by Tropicraft.
the class TropicraftBiomes method onBiomeLoad.
@SubscribeEvent
public static void onBiomeLoad(BiomeLoadingEvent event) {
ResourceLocation name = event.getName();
if (name != null && name.getNamespace().equals(Constants.MODID)) {
return;
}
Biome.BiomeCategory category = event.getCategory();
Biome.Precipitation precipitation = event.getClimate().precipitation;
if (precipitation == Biome.Precipitation.SNOW) {
return;
}
BiomeGenerationSettingsBuilder generation = event.getGeneration();
if (category == Biome.BiomeCategory.BEACH) {
generation.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, TropicraftFeatures.NORMAL_PALM_TREE.get().configured(NoneFeatureConfiguration.INSTANCE).decorated(Features.Decorators.HEIGHTMAP_SQUARE).decorated(FeatureDecorator.COUNT_EXTRA.configured(new FrequencyWithExtraChanceDecoratorConfiguration(0, 0.08F, 1))));
generation.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, TropicraftFeatures.CURVED_PALM_TREE.get().configured(NoneFeatureConfiguration.INSTANCE).decorated(Features.Decorators.HEIGHTMAP_SQUARE).decorated(FeatureDecorator.COUNT_EXTRA.configured(new FrequencyWithExtraChanceDecoratorConfiguration(0, 0.08F, 1))));
generation.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, TropicraftFeatures.LARGE_PALM_TREE.get().configured(NoneFeatureConfiguration.INSTANCE).decorated(Features.Decorators.HEIGHTMAP_SQUARE).decorated(FeatureDecorator.COUNT_EXTRA.configured(new FrequencyWithExtraChanceDecoratorConfiguration(0, 0.08F, 1))));
} else if (category == Biome.BiomeCategory.JUNGLE) {
SimpleStateProvider state = new SimpleStateProvider(TropicraftBlocks.PINEAPPLE.get().defaultBlockState());
generation.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, Feature.RANDOM_PATCH.configured(new RandomPatchConfiguration.GrassConfigurationBuilder(state, new DoublePlantPlacer()).tries(6).canReplace().build()).decorated(Features.Decorators.HEIGHTMAP_DOUBLE_SQUARE));
}
}
Aggregations