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.ChanceDecoratorConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.CountFeatureConfiguration; import net.minecraft.world.level.levelgen.placement.NoiseCountFactorDecoratorConfiguration; import net.minecraft.world.level.levelgen.Heightmap; import net.minecraft.world.level.levelgen.placement.FeatureDecorator; import java.util.List; import net.minecraft.world.level.levelgen.feature.configurations.SimpleRandomFeatureConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import com.google.common.collect.ImmutableList; import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration; import net.minecraft.world.level.levelgen.GenerationStep; import net.minecraft.world.level.levelgen.feature.configurations.ShipwreckConfiguration; 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.OceanRuinConfiguration; import net.minecraft.world.level.levelgen.structure.OceanRuinFeature; 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 class WarmOceanBiome extends Biome { public WarmOceanBiome() { super(new BiomeBuilder().surfaceBuilder(SurfaceBuilder.DEFAULT, SurfaceBuilder.CONFIG_FULL_SAND).precipitation(Precipitation.RAIN).biomeCategory(BiomeCategory.OCEAN).depth(-1.0f).scale(0.1f).temperature(0.5f).downfall(0.5f).waterColor(4445678).waterFogColor(270131).parent(null)); this.addStructureStart(Feature.OCEAN_RUIN.configured(new OceanRuinConfiguration(OceanRuinFeature.Type.WARM, 0.3f, 0.9f))); this.addStructureStart(Feature.MINESHAFT.configured(new MineshaftConfiguration(0.004, MineshaftFeature.Type.NORMAL))); this.addStructureStart(Feature.SHIPWRECK.configured(new ShipwreckConfiguration(false))); BiomeDefaultFeatures.addOceanCarvers(this); BiomeDefaultFeatures.addStructureFeaturePlacement(this); BiomeDefaultFeatures.addDefaultLakes(this); BiomeDefaultFeatures.addDefaultMonsterRoom(this); BiomeDefaultFeatures.addDefaultUndergroundVariety(this); BiomeDefaultFeatures.addDefaultOres(this); BiomeDefaultFeatures.addDefaultSoftDisks(this); BiomeDefaultFeatures.addWaterTrees(this); BiomeDefaultFeatures.addDefaultFlowers(this); BiomeDefaultFeatures.addDefaultGrass(this); BiomeDefaultFeatures.addDefaultMushrooms(this); BiomeDefaultFeatures.addDefaultExtraVegetation(this); BiomeDefaultFeatures.addDefaultSprings(this); this.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, Feature.SIMPLE_RANDOM_SELECTOR.configured(new SimpleRandomFeatureConfiguration(ImmutableList.of(Feature.CORAL_TREE.configured(FeatureConfiguration.NONE), Feature.CORAL_CLAW.configured(FeatureConfiguration.NONE), Feature.CORAL_MUSHROOM.configured(FeatureConfiguration.NONE)))).decorated(FeatureDecorator.TOP_SOLID_HEIGHTMAP_NOISE_BIASED.configured(new NoiseCountFactorDecoratorConfiguration(20, 400.0, 0.0, Heightmap.Types.OCEAN_FLOOR_WG)))); BiomeDefaultFeatures.addWarmSeagrass(this); this.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, Feature.SEA_PICKLE.configured(new CountFeatureConfiguration(20)).decorated(FeatureDecorator.CHANCE_TOP_SOLID_HEIGHTMAP.configured(new ChanceDecoratorConfiguration(16)))); BiomeDefaultFeatures.addSurfaceFreezing(this); this.addSpawn(MobCategory.WATER_CREATURE, new SpawnerData(EntityType.SQUID, 10, 4, 4)); this.addSpawn(MobCategory.WATER_CREATURE, new SpawnerData(EntityType.PUFFERFISH, 15, 1, 3)); this.addSpawn(MobCategory.WATER_CREATURE, new SpawnerData(EntityType.TROPICAL_FISH, 25, 8, 8)); this.addSpawn(MobCategory.WATER_CREATURE, new SpawnerData(EntityType.DOLPHIN, 2, 1, 2)); 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)); } }