BiomesOPlenty/src/main/java/biomesoplenty/common/biome/nether/UndergrowthBiome.java

83 lines
5.6 KiB
Java
Raw Normal View History

package biomesoplenty.common.biome.nether;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.enums.BOPClimates;
2020-09-07 02:10:07 +00:00
import biomesoplenty.common.biome.NetherBiomeTemplate;
2019-12-25 08:38:59 +00:00
import biomesoplenty.common.world.biome.BiomeFeatureHelper;
2020-09-21 13:28:40 +00:00
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
2020-09-19 08:53:19 +00:00
import biomesoplenty.common.world.gen.feature.BOPFeatures;
2020-07-03 16:47:52 +00:00
import net.minecraft.client.audio.BackgroundMusicTracks;
import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.EntityType;
2020-07-06 06:37:51 +00:00
import net.minecraft.particles.ParticleTypes;
2020-07-03 16:47:52 +00:00
import net.minecraft.util.SoundEvents;
import net.minecraft.world.biome.*;
import net.minecraft.world.gen.GenerationStage;
2020-08-25 11:51:25 +00:00
import net.minecraft.world.gen.carver.ConfiguredCarvers;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.Features;
import net.minecraft.world.gen.feature.IFeatureConfig;
import net.minecraft.world.gen.feature.structure.StructureFeatures;
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
2020-09-07 02:10:07 +00:00
public class UndergrowthBiome extends NetherBiomeTemplate
{
public UndergrowthBiome()
{
2020-08-25 11:51:25 +00:00
this.addWeight(BOPClimates.NETHER, 10);
}
2020-08-25 11:51:25 +00:00
@Override
protected void configureBiome(Biome.Builder builder)
{
builder.precipitation(Biome.RainType.NONE).biomeCategory(Biome.Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F);
2020-08-25 21:44:44 +00:00
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(0x1C2109).skyColor(calculateSkyColor(2.0F)).ambientParticle(new ParticleEffectAmbience(ParticleTypes.MYCELIUM, 0.00714F)).ambientLoopSound(SoundEvents.AMBIENT_WARPED_FOREST_LOOP).ambientMoodSound(new MoodSoundAmbience(SoundEvents.AMBIENT_CRIMSON_FOREST_MOOD, 6000, 8, 2.0D)).ambientAdditionsSound(new SoundAdditionsAmbience(SoundEvents.AMBIENT_NETHER_WASTES_ADDITIONS, 0.0111D)).backgroundMusic(BackgroundMusicTracks.createGameMusic(SoundEvents.MUSIC_BIOME_NETHER_WASTES)).build());
2020-08-25 11:51:25 +00:00
}
2020-08-25 11:51:25 +00:00
@Override
2020-09-19 09:10:20 +00:00
protected void configureGeneration(BiomeGenerationSettingsRegistryBuilder builder)
2020-08-25 11:51:25 +00:00
{
builder.surfaceBuilder(new ConfiguredSurfaceBuilder(SurfaceBuilder.NETHER, SurfaceBuilder.CONFIG_HELL));
2020-08-25 11:51:25 +00:00
//Terrain
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_NETHER);
builder.addStructureStart(StructureFeatures.NETHER_BRIDGE);
builder.addStructureStart(StructureFeatures.BASTION_REMNANT);
builder.addCarver(GenerationStage.Carving.AIR, ConfiguredCarvers.NETHER_CAVE);
2019-12-26 03:31:52 +00:00
2020-08-25 11:51:25 +00:00
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.SPRING_OPEN);
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.PATCH_FIRE);
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.PATCH_SOUL_FIRE);
2020-09-21 13:28:40 +00:00
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.GLOWSTONE_EXTRA);
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.GLOWSTONE);
2020-08-25 11:51:25 +00:00
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.BROWN_MUSHROOM_NETHER);
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.RED_MUSHROOM_NETHER);
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.ORE_MAGMA);
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.SPRING_CLOSED);
2020-08-25 11:51:25 +00:00
//Vegetation
2020-09-19 08:53:19 +00:00
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPFeatures.HELLBARK_TREE.configured(Features.OAK.config()).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(35)));
2020-09-19 08:53:19 +00:00
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPFeatures.BRAMBLE.configured(IFeatureConfig.NONE).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(50)));
2020-08-25 11:51:25 +00:00
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.burning_blossom.defaultBlockState())).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(8)));
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.sprout.defaultBlockState())).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(75)));
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.dead_grass.defaultBlockState())).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(40)));
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Feature.RANDOM_PATCH.configured(BiomeFeatureHelper.createClusterConfiguration(BOPBlocks.root.defaultBlockState())).decorated(Features.Placements.HEIGHTMAP_DOUBLE_SQUARE.count(8)));
2020-09-21 13:28:40 +00:00
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.NETHER_VINES);
2020-07-03 16:47:52 +00:00
2020-08-25 11:51:25 +00:00
DefaultBiomeFeatures.addNetherDefaultOres(builder);
}
2020-08-25 11:51:25 +00:00
@Override
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
{
//Entities
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.GHAST, 50, 4, 4));
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.MAGMA_CUBE, 2, 4, 4));
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.HOGLIN, 9, 3, 4));
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.STRIDER, 60, 1, 2));
}
}