NetherBiomes.java

net.minecraft.data.worldgen.biome.NetherBiomes

信息

  • 全限定名:net.minecraft.data.worldgen.biome.NetherBiomes
  • 类型:public class
  • 包:net.minecraft.data.worldgen.biome
  • 源码路径:src/main/java/net/minecraft/data/worldgen/biome/NetherBiomes.java
  • 起始行号:L31
  • 职责:

    TODO

字段/常量

内部类/嵌套类型

构造器

方法

下面的方法块按源码顺序生成。

private static Biome.BiomeBuilder baseBiome() @ L32

  • 方法名:baseBiome
  • 源码定位:L32
  • 返回类型:Biome.BiomeBuilder
  • 修饰符:private static

参数:

说明:

TODO

public static Biome netherWastes(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) @ L40

  • 方法名:netherWastes
  • 源码定位:L40
  • 返回类型:Biome
  • 修饰符:public static

参数:

  • placedFeatures: HolderGetter
  • carvers: HolderGetter<ConfiguredWorldCarver<?>>

说明:

TODO

public static Biome soulSandValley(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) @ L79

  • 方法名:soulSandValley
  • 源码定位:L79
  • 返回类型:Biome
  • 修饰符:public static

参数:

  • placedFeatures: HolderGetter
  • carvers: HolderGetter<ConfiguredWorldCarver<?>>

说明:

TODO

public static Biome basaltDeltas(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) @ L123

  • 方法名:basaltDeltas
  • 源码定位:L123
  • 返回类型:Biome
  • 修饰符:public static

参数:

  • placedFeatures: HolderGetter
  • carvers: HolderGetter<ConfiguredWorldCarver<?>>

说明:

TODO

public static Biome crimsonForest(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) @ L165

  • 方法名:crimsonForest
  • 源码定位:L165
  • 返回类型:Biome
  • 修饰符:public static

参数:

  • placedFeatures: HolderGetter
  • carvers: HolderGetter<ConfiguredWorldCarver<?>>

说明:

TODO

public static Biome warpedForest(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) @ L203

  • 方法名:warpedForest
  • 源码定位:L203
  • 返回类型:Biome
  • 修饰符:public static

参数:

  • placedFeatures: HolderGetter
  • carvers: HolderGetter<ConfiguredWorldCarver<?>>

说明:

TODO

代码

public class NetherBiomes {
    private static Biome.BiomeBuilder baseBiome() {
        return new Biome.BiomeBuilder()
            .hasPrecipitation(false)
            .temperature(2.0F)
            .downfall(0.0F)
            .specialEffects(new BiomeSpecialEffects.Builder().waterColor(4159204).build());
    }
 
    public static Biome netherWastes(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) {
        MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
            .addSpawn(MobCategory.MONSTER, 50, new MobSpawnSettings.SpawnerData(EntityType.GHAST, 4, 4))
            .addSpawn(MobCategory.MONSTER, 100, new MobSpawnSettings.SpawnerData(EntityType.ZOMBIFIED_PIGLIN, 4, 4))
            .addSpawn(MobCategory.MONSTER, 2, new MobSpawnSettings.SpawnerData(EntityType.MAGMA_CUBE, 4, 4))
            .addSpawn(MobCategory.MONSTER, 1, new MobSpawnSettings.SpawnerData(EntityType.ENDERMAN, 4, 4))
            .addSpawn(MobCategory.MONSTER, 15, new MobSpawnSettings.SpawnerData(EntityType.PIGLIN, 4, 4))
            .addSpawn(MobCategory.CREATURE, 60, new MobSpawnSettings.SpawnerData(EntityType.STRIDER, 1, 2))
            .build();
        BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
            .addCarver(Carvers.NETHER_CAVE)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, MiscOverworldPlacements.SPRING_LAVA);
        BiomeDefaultFeatures.addDefaultMushrooms(generation);
        generation.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_OPEN)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_SOUL_FIRE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, VegetationPlacements.BROWN_MUSHROOM_NETHER)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, VegetationPlacements.RED_MUSHROOM_NETHER)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED);
        BiomeDefaultFeatures.addNetherDefaultOres(generation);
        return baseBiome()
            .setAttribute(EnvironmentAttributes.FOG_COLOR, -13432824)
            .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_NETHER_WASTES))
            .setAttribute(
                EnvironmentAttributes.AMBIENT_SOUNDS,
                new AmbientSounds(
                    Optional.of(SoundEvents.AMBIENT_NETHER_WASTES_LOOP),
                    Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_NETHER_WASTES_MOOD, 6000, 8, 2.0)),
                    List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_NETHER_WASTES_ADDITIONS, 0.0111))
                )
            )
            .mobSpawnSettings(mobSpawnSettings)
            .generationSettings(generation.build())
            .build();
    }
 
    public static Biome soulSandValley(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) {
        double unitCharge = 0.7;
        double energyBudget = 0.15;
        MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
            .addSpawn(MobCategory.MONSTER, 20, new MobSpawnSettings.SpawnerData(EntityType.SKELETON, 5, 5))
            .addSpawn(MobCategory.MONSTER, 50, new MobSpawnSettings.SpawnerData(EntityType.GHAST, 4, 4))
            .addSpawn(MobCategory.MONSTER, 1, new MobSpawnSettings.SpawnerData(EntityType.ENDERMAN, 4, 4))
            .addSpawn(MobCategory.CREATURE, 60, new MobSpawnSettings.SpawnerData(EntityType.STRIDER, 1, 2))
            .addMobCharge(EntityType.SKELETON, 0.7, 0.15)
            .addMobCharge(EntityType.GHAST, 0.7, 0.15)
            .addMobCharge(EntityType.ENDERMAN, 0.7, 0.15)
            .addMobCharge(EntityType.STRIDER, 0.7, 0.15)
            .build();
        BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
            .addCarver(Carvers.NETHER_CAVE)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, MiscOverworldPlacements.SPRING_LAVA)
            .addFeature(GenerationStep.Decoration.LOCAL_MODIFICATIONS, NetherPlacements.BASALT_PILLAR)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_OPEN)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_SOUL_FIRE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_CRIMSON_ROOTS)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_SOUL_SAND);
        BiomeDefaultFeatures.addNetherDefaultOres(generation);
        return baseBiome()
            .setAttribute(EnvironmentAttributes.FOG_COLOR, -14989499)
            .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_SOUL_SAND_VALLEY))
            .setAttribute(EnvironmentAttributes.AMBIENT_PARTICLES, AmbientParticle.of(ParticleTypes.ASH, 0.00625F))
            .setAttribute(
                EnvironmentAttributes.AMBIENT_SOUNDS,
                new AmbientSounds(
                    Optional.of(SoundEvents.AMBIENT_SOUL_SAND_VALLEY_LOOP),
                    Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_SOUL_SAND_VALLEY_MOOD, 6000, 8, 2.0)),
                    List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_SOUL_SAND_VALLEY_ADDITIONS, 0.0111))
                )
            )
            .mobSpawnSettings(mobSpawnSettings)
            .generationSettings(generation.build())
            .build();
    }
 
    public static Biome basaltDeltas(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) {
        MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
            .addSpawn(MobCategory.MONSTER, 40, new MobSpawnSettings.SpawnerData(EntityType.GHAST, 1, 1))
            .addSpawn(MobCategory.MONSTER, 100, new MobSpawnSettings.SpawnerData(EntityType.MAGMA_CUBE, 2, 5))
            .addSpawn(MobCategory.CREATURE, 60, new MobSpawnSettings.SpawnerData(EntityType.STRIDER, 1, 2))
            .build();
        BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
            .addCarver(Carvers.NETHER_CAVE)
            .addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, NetherPlacements.DELTA)
            .addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, NetherPlacements.SMALL_BASALT_COLUMNS)
            .addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, NetherPlacements.LARGE_BASALT_COLUMNS)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.BASALT_BLOBS)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.BLACKSTONE_BLOBS)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_DELTA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_SOUL_FIRE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, VegetationPlacements.BROWN_MUSHROOM_NETHER)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, VegetationPlacements.RED_MUSHROOM_NETHER)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED_DOUBLE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_GOLD_DELTAS)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_QUARTZ_DELTAS);
        BiomeDefaultFeatures.addAncientDebris(generation);
        return baseBiome()
            .setAttribute(EnvironmentAttributes.FOG_COLOR, -9937040)
            .setAttribute(EnvironmentAttributes.AMBIENT_PARTICLES, AmbientParticle.of(ParticleTypes.WHITE_ASH, 0.118093334F))
            .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_BASALT_DELTAS))
            .setAttribute(
                EnvironmentAttributes.AMBIENT_SOUNDS,
                new AmbientSounds(
                    Optional.of(SoundEvents.AMBIENT_BASALT_DELTAS_LOOP),
                    Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_BASALT_DELTAS_MOOD, 6000, 8, 2.0)),
                    List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_BASALT_DELTAS_ADDITIONS, 0.0111))
                )
            )
            .mobSpawnSettings(mobSpawnSettings)
            .generationSettings(generation.build())
            .build();
    }
 
    public static Biome crimsonForest(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) {
        MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
            .addSpawn(MobCategory.MONSTER, 1, new MobSpawnSettings.SpawnerData(EntityType.ZOMBIFIED_PIGLIN, 2, 4))
            .addSpawn(MobCategory.MONSTER, 9, new MobSpawnSettings.SpawnerData(EntityType.HOGLIN, 3, 4))
            .addSpawn(MobCategory.MONSTER, 5, new MobSpawnSettings.SpawnerData(EntityType.PIGLIN, 3, 4))
            .addSpawn(MobCategory.CREATURE, 60, new MobSpawnSettings.SpawnerData(EntityType.STRIDER, 1, 2))
            .build();
        BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
            .addCarver(Carvers.NETHER_CAVE)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, MiscOverworldPlacements.SPRING_LAVA);
        BiomeDefaultFeatures.addDefaultMushrooms(generation);
        generation.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_OPEN)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.WEEPING_VINES)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, TreePlacements.CRIMSON_FUNGI)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.CRIMSON_FOREST_VEGETATION);
        BiomeDefaultFeatures.addNetherDefaultOres(generation);
        return baseBiome()
            .setAttribute(EnvironmentAttributes.FOG_COLOR, -13434109)
            .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_CRIMSON_FOREST))
            .setAttribute(EnvironmentAttributes.AMBIENT_PARTICLES, AmbientParticle.of(ParticleTypes.CRIMSON_SPORE, 0.025F))
            .setAttribute(
                EnvironmentAttributes.AMBIENT_SOUNDS,
                new AmbientSounds(
                    Optional.of(SoundEvents.AMBIENT_CRIMSON_FOREST_LOOP),
                    Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_CRIMSON_FOREST_MOOD, 6000, 8, 2.0)),
                    List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_CRIMSON_FOREST_ADDITIONS, 0.0111))
                )
            )
            .mobSpawnSettings(mobSpawnSettings)
            .generationSettings(generation.build())
            .build();
    }
 
    public static Biome warpedForest(HolderGetter<PlacedFeature> placedFeatures, HolderGetter<ConfiguredWorldCarver<?>> carvers) {
        MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
            .addSpawn(MobCategory.MONSTER, 1, new MobSpawnSettings.SpawnerData(EntityType.ENDERMAN, 4, 4))
            .addSpawn(MobCategory.CREATURE, 60, new MobSpawnSettings.SpawnerData(EntityType.STRIDER, 1, 2))
            .addMobCharge(EntityType.ENDERMAN, 1.0, 0.12)
            .build();
        BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
            .addCarver(Carvers.NETHER_CAVE)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, MiscOverworldPlacements.SPRING_LAVA);
        BiomeDefaultFeatures.addDefaultMushrooms(generation);
        generation.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_OPEN)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_SOUL_FIRE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
            .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, TreePlacements.WARPED_FUNGI)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.WARPED_FOREST_VEGETATION)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.NETHER_SPROUTS)
            .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.TWISTING_VINES);
        BiomeDefaultFeatures.addNetherDefaultOres(generation);
        return baseBiome()
            .setAttribute(EnvironmentAttributes.FOG_COLOR, -15071974)
            .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_WARPED_FOREST))
            .setAttribute(EnvironmentAttributes.AMBIENT_PARTICLES, AmbientParticle.of(ParticleTypes.WARPED_SPORE, 0.01428F))
            .setAttribute(
                EnvironmentAttributes.AMBIENT_SOUNDS,
                new AmbientSounds(
                    Optional.of(SoundEvents.AMBIENT_WARPED_FOREST_LOOP),
                    Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_WARPED_FOREST_MOOD, 6000, 8, 2.0)),
                    List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_WARPED_FOREST_ADDITIONS, 0.0111))
                )
            )
            .mobSpawnSettings(mobSpawnSettings)
            .generationSettings(generation.build())
            .build();
    }
}

引用的其他类

  • HolderGetter

    • 引用位置: 参数
  • BiomeDefaultFeatures

    • 引用位置: 方法调用
    • 关联成员: BiomeDefaultFeatures.addAncientDebris(), BiomeDefaultFeatures.addDefaultMushrooms(), BiomeDefaultFeatures.addNetherDefaultOres()
  • AmbientAdditionsSettings

    • 引用位置: 构造调用
    • 关联成员: AmbientAdditionsSettings()
  • AmbientMoodSettings

    • 引用位置: 构造调用
    • 关联成员: AmbientMoodSettings()
  • AmbientParticle

    • 引用位置: 方法调用
    • 关联成员: AmbientParticle.of()
  • AmbientSounds

    • 引用位置: 构造调用
    • 关联成员: AmbientSounds()
  • BackgroundMusic

    • 引用位置: 构造调用
    • 关联成员: BackgroundMusic()
  • Biome

    • 引用位置: 方法调用/构造调用/返回值
    • 关联成员: Biome.BiomeBuilder(), BiomeBuilder()
  • BiomeGenerationSettings

    • 引用位置: 方法调用/构造调用
    • 关联成员: BiomeGenerationSettings.Builder(), Builder()
  • BiomeSpecialEffects

    • 引用位置: 方法调用/构造调用
    • 关联成员: BiomeSpecialEffects.Builder(), Builder()
  • MobSpawnSettings

    • 引用位置: 方法调用/构造调用
    • 关联成员: Builder(), MobSpawnSettings.Builder(), MobSpawnSettings.SpawnerData(), SpawnerData()
  • ConfiguredWorldCarver

    • 引用位置: 参数
  • PlacedFeature

    • 引用位置: 参数