65 lines
5.2 KiB
Java
65 lines
5.2 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.ConfiguredDecorator;
|
|
import net.minecraft.world.level.levelgen.feature.configurations.DecoratorConfiguration;
|
|
import net.minecraft.world.level.levelgen.placement.FeatureDecorator;
|
|
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
|
import java.util.List;
|
|
import net.minecraft.world.level.levelgen.feature.configurations.RandomFeatureConfiguration;
|
|
import net.minecraft.world.level.levelgen.feature.configurations.HugeMushroomFeatureConfiguration;
|
|
import net.minecraft.world.level.levelgen.feature.WeightedConfiguredFeature;
|
|
import com.google.common.collect.ImmutableList;
|
|
import net.minecraft.world.level.levelgen.GenerationStep;
|
|
import net.minecraft.world.level.levelgen.feature.configurations.MineshaftConfiguration;
|
|
import net.minecraft.world.level.levelgen.feature.MineshaftFeature;
|
|
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.Feature;
|
|
import net.minecraft.world.level.levelgen.surfacebuilders.SurfaceBuilderBaseConfiguration;
|
|
import net.minecraft.world.level.levelgen.surfacebuilders.SurfaceBuilder;
|
|
|
|
public final class DarkForestBiome extends Biome {
|
|
public DarkForestBiome() {
|
|
super(new BiomeBuilder().<SurfaceBuilderBaseConfiguration>surfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.CONFIG_GRASS).precipitation(Precipitation.RAIN).biomeCategory(BiomeCategory.FOREST).depth(0.1f).scale(0.2f).temperature(0.7f).downfall(0.8f).waterColor(4159204).waterFogColor(329011).parent(null));
|
|
this.<NoneFeatureConfiguration>addStructureStart(Feature.WOODLAND_MANSION.configured(FeatureConfiguration.NONE));
|
|
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_SELECTOR.configured(new RandomFeatureConfiguration(ImmutableList.of(Feature.HUGE_BROWN_MUSHROOM.configured(BiomeDefaultFeatures.HUGE_BROWN_MUSHROOM_CONFIG).weighted(0.025f), Feature.HUGE_RED_MUSHROOM.configured(BiomeDefaultFeatures.HUGE_RED_MUSHROOM_CONFIG).weighted(0.05f), (WeightedConfiguredFeature<HugeMushroomFeatureConfiguration>)Feature.DARK_OAK_TREE.configured(BiomeDefaultFeatures.DARK_OAK_TREE_CONFIG).weighted(0.6666667f), (WeightedConfiguredFeature<HugeMushroomFeatureConfiguration>)Feature.NORMAL_TREE.configured(BiomeDefaultFeatures.BIRCH_TREE_CONFIG).weighted(0.2f), (WeightedConfiguredFeature<HugeMushroomFeatureConfiguration>)Feature.FANCY_TREE.configured(BiomeDefaultFeatures.FANCY_TREE_CONFIG).weighted(0.1f)), Feature.NORMAL_TREE.configured(BiomeDefaultFeatures.NORMAL_TREE_CONFIG))).decorated(FeatureDecorator.DARK_OAK_TREE.configured(DecoratorConfiguration.NONE)));
|
|
BiomeDefaultFeatures.addForestFlowers(this);
|
|
BiomeDefaultFeatures.addDefaultUndergroundVariety(this);
|
|
BiomeDefaultFeatures.addDefaultOres(this);
|
|
BiomeDefaultFeatures.addDefaultSoftDisks(this);
|
|
BiomeDefaultFeatures.addDefaultFlowers(this);
|
|
BiomeDefaultFeatures.addForestGrass(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.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));
|
|
}
|
|
|
|
@Override
|
|
public int getGrassColor(final double double1, final double double2) {
|
|
final int integer6 = super.getGrassColor(double1, double2);
|
|
return (integer6 & 0xFEFEFE) + 2634762 >> 1;
|
|
}
|
|
}
|