minecraft-source/src/net/minecraft/world/level/biome/ForestFlowerBiome.java

61 lines
5.5 KiB
Java

package net.minecraft.world.level.biome;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraft.world.level.levelgen.placement.FrequencyWithExtraChanceDecoratorConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.RandomFeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.SmallTreeConfiguration;
import net.minecraft.world.level.levelgen.feature.WeightedConfiguredFeature;
import net.minecraft.world.level.levelgen.placement.FrequencyDecoratorConfiguration;
import net.minecraft.world.level.levelgen.placement.FeatureDecorator;
import java.util.List;
import net.minecraft.world.level.levelgen.feature.configurations.RandomRandomFeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.RandomPatchConfiguration;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import com.google.common.collect.ImmutableList;
import net.minecraft.world.level.levelgen.GenerationStep;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;
import net.minecraft.world.level.levelgen.feature.configurations.MineshaftConfiguration;
import net.minecraft.world.level.levelgen.feature.MineshaftFeature;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.surfacebuilders.SurfaceBuilderBaseConfiguration;
import net.minecraft.world.level.levelgen.surfacebuilders.SurfaceBuilder;
public final class ForestFlowerBiome extends Biome {
public ForestFlowerBiome() {
super(new BiomeBuilder().<SurfaceBuilderBaseConfiguration>surfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.CONFIG_GRASS).precipitation(Precipitation.RAIN).biomeCategory(BiomeCategory.FOREST).depth(0.1f).scale(0.4f).temperature(0.7f).downfall(0.8f).waterColor(4159204).waterFogColor(329011).parent("forest"));
this.<MineshaftConfiguration>addStructureStart(Feature.MINESHAFT.configured(new MineshaftConfiguration(0.004, MineshaftFeature.Type.NORMAL)));
this.<NoneFeatureConfiguration>addStructureStart(Feature.STRONGHOLD.configured(FeatureConfiguration.NONE));
BiomeDefaultFeatures.addDefaultCarvers(this);
BiomeDefaultFeatures.addStructureFeaturePlacement(this);
BiomeDefaultFeatures.addDefaultLakes(this);
BiomeDefaultFeatures.addDefaultMonsterRoom(this);
this.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, Feature.RANDOM_RANDOM_SELECTOR.configured(new RandomRandomFeatureConfiguration(ImmutableList.of(Feature.RANDOM_PATCH.configured(BiomeDefaultFeatures.DOUBLE_LILAC_CONFIG), Feature.RANDOM_PATCH.configured(BiomeDefaultFeatures.DOUBLE_ROSE_BUSH_CONFIG), Feature.RANDOM_PATCH.configured(BiomeDefaultFeatures.DOUBLE_PEONY_CONFIG), Feature.FLOWER.configured(BiomeDefaultFeatures.GENERAL_FOREST_FLOWER_CONFIG)), 2)).decorated(FeatureDecorator.COUNT_HEIGHTMAP_32.configured(new FrequencyDecoratorConfiguration(5))));
BiomeDefaultFeatures.addDefaultUndergroundVariety(this);
BiomeDefaultFeatures.addDefaultOres(this);
BiomeDefaultFeatures.addDefaultSoftDisks(this);
this.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, Feature.RANDOM_SELECTOR.configured(new RandomFeatureConfiguration(ImmutableList.of(Feature.NORMAL_TREE.configured(BiomeDefaultFeatures.BIRCH_TREE_WITH_BEES_001_CONFIG).weighted(0.2f), Feature.FANCY_TREE.configured(BiomeDefaultFeatures.FANCY_TREE_WITH_BEES_001_CONFIG).weighted(0.1f)), Feature.NORMAL_TREE.configured(BiomeDefaultFeatures.NORMAL_TREE_WITH_BEES_001_CONFIG))).decorated(FeatureDecorator.COUNT_EXTRA_HEIGHTMAP.configured(new FrequencyWithExtraChanceDecoratorConfiguration(6, 0.1f, 1))));
this.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, Feature.FLOWER.configured(BiomeDefaultFeatures.FOREST_FLOWER_CONFIG).decorated(FeatureDecorator.COUNT_HEIGHTMAP_32.configured(new FrequencyDecoratorConfiguration(100))));
BiomeDefaultFeatures.addDefaultGrass(this);
BiomeDefaultFeatures.addDefaultMushrooms(this);
BiomeDefaultFeatures.addDefaultExtraVegetation(this);
BiomeDefaultFeatures.addDefaultSprings(this);
BiomeDefaultFeatures.addSurfaceFreezing(this);
this.addSpawn(MobCategory.CREATURE, new SpawnerData(EntityType.SHEEP, 12, 4, 4));
this.addSpawn(MobCategory.CREATURE, new SpawnerData(EntityType.PIG, 10, 4, 4));
this.addSpawn(MobCategory.CREATURE, new SpawnerData(EntityType.CHICKEN, 10, 4, 4));
this.addSpawn(MobCategory.CREATURE, new SpawnerData(EntityType.COW, 8, 4, 4));
this.addSpawn(MobCategory.CREATURE, new SpawnerData(EntityType.RABBIT, 4, 2, 3));
this.addSpawn(MobCategory.AMBIENT, new SpawnerData(EntityType.BAT, 10, 8, 8));
this.addSpawn(MobCategory.MONSTER, new SpawnerData(EntityType.SPIDER, 100, 4, 4));
this.addSpawn(MobCategory.MONSTER, new SpawnerData(EntityType.ZOMBIE, 95, 4, 4));
this.addSpawn(MobCategory.MONSTER, new SpawnerData(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
this.addSpawn(MobCategory.MONSTER, new SpawnerData(EntityType.SKELETON, 100, 4, 4));
this.addSpawn(MobCategory.MONSTER, new SpawnerData(EntityType.CREEPER, 100, 4, 4));
this.addSpawn(MobCategory.MONSTER, new SpawnerData(EntityType.SLIME, 100, 4, 4));
this.addSpawn(MobCategory.MONSTER, new SpawnerData(EntityType.ENDERMAN, 10, 1, 4));
this.addSpawn(MobCategory.MONSTER, new SpawnerData(EntityType.WITCH, 5, 1, 1));
}
}