| 1 | package net.minecraft.data.worldgen.biome;
|
| 2 |
|
| 3 | import java.util.List;
|
| 4 | import java.util.Optional;
|
| 5 | import net.minecraft.core.HolderGetter;
|
| 6 | import net.minecraft.core.particles.ParticleTypes;
|
| 7 | import net.minecraft.data.worldgen.BiomeDefaultFeatures;
|
| 8 | import net.minecraft.data.worldgen.Carvers;
|
| 9 | import net.minecraft.data.worldgen.placement.MiscOverworldPlacements;
|
| 10 | import net.minecraft.data.worldgen.placement.NetherPlacements;
|
| 11 | import net.minecraft.data.worldgen.placement.OrePlacements;
|
| 12 | import net.minecraft.data.worldgen.placement.TreePlacements;
|
| 13 | import net.minecraft.data.worldgen.placement.VegetationPlacements;
|
| 14 | import net.minecraft.sounds.SoundEvents;
|
| 15 | import net.minecraft.util.ARGB;
|
| 16 | import net.minecraft.world.attribute.AmbientAdditionsSettings;
|
| 17 | import net.minecraft.world.attribute.AmbientMoodSettings;
|
| 18 | import net.minecraft.world.attribute.AmbientParticle;
|
| 19 | import net.minecraft.world.attribute.AmbientSounds;
|
| 20 | import net.minecraft.world.attribute.BackgroundMusic;
|
| 21 | import net.minecraft.world.attribute.EnvironmentAttributes;
|
| 22 | import net.minecraft.world.attribute.modifier.ListModifier;
|
| 23 | import net.minecraft.world.entity.EntityTypes;
|
| 24 | import net.minecraft.world.level.biome.Biome;
|
| 25 | import net.minecraft.world.level.biome.BiomeGenerationSettings;
|
| 26 | import net.minecraft.world.level.biome.BiomeSpecialEffects;
|
| 27 | import net.minecraft.world.level.biome.MobSpawnSettings;
|
| 28 | import net.minecraft.world.level.levelgen.GenerationStep;
|
| 29 | import net.minecraft.world.level.levelgen.carver.WorldCarver;
|
| 30 | import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
| 31 |
|
| 32 | /**
|
| 33 | * Access widened by fabric-transitive-access-wideners-v1 to accessible
|
| 34 | */
|
| 35 | public class NetherBiomes {
|
| 36 | /**
|
| 37 | * Access widened by fabric-transitive-access-wideners-v1 to accessible
|
| 38 | */
|
| 39 | public static Biome.BiomeBuilder baseBiome() {
|
| 40 | return new Biome.BiomeBuilder()
|
| 41 | .hasPrecipitation(false)
|
| 42 | .temperature(2.0F)
|
| 43 | .downfall(0.0F)
|
| 44 | .specialEffects(new BiomeSpecialEffects.Builder().waterColor(4159204).build());
|
| 45 | }
|
| 46 |
|
| 47 | public static Biome netherWastes(final HolderGetter<PlacedFeature> placedFeatures, final HolderGetter<WorldCarver> carvers) {
|
| 48 | MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
|
| 49 | .addSpawn(EntityTypes.GHAST, 50, 4, 4)
|
| 50 | .addSpawn(EntityTypes.ZOMBIFIED_PIGLIN, 100, 4, 4)
|
| 51 | .addSpawn(EntityTypes.MAGMA_CUBE, 2, 4, 4)
|
| 52 | .addSpawn(EntityTypes.ENDERMAN, 1, 4, 4)
|
| 53 | .addSpawn(EntityTypes.PIGLIN, 15, 4, 4)
|
| 54 | .addSpawn(EntityTypes.STRIDER, 60, 1, 2)
|
| 55 | .build();
|
| 56 | BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
|
| 57 | .addCarver(Carvers.NETHER_CAVE)
|
| 58 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, MiscOverworldPlacements.SPRING_LAVA);
|
| 59 | BiomeDefaultFeatures.addDefaultMushrooms(generation);
|
| 60 | generation.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_OPEN)
|
| 61 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
|
| 62 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_SOUL_FIRE)
|
| 63 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
|
| 64 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
|
| 65 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, VegetationPlacements.BROWN_MUSHROOM_NETHER)
|
| 66 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, VegetationPlacements.RED_MUSHROOM_NETHER)
|
| 67 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
|
| 68 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED);
|
| 69 | BiomeDefaultFeatures.addNetherDefaultOres(generation);
|
| 70 | return baseBiome()
|
| 71 | .setAttribute(EnvironmentAttributes.FOG_COLOR, ARGB.vector3fFromRGB24(-13432824))
|
| 72 | .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_NETHER_WASTES))
|
| 73 | .setAttribute(
|
| 74 | EnvironmentAttributes.AMBIENT_SOUNDS,
|
| 75 | new AmbientSounds(
|
| 76 | Optional.of(SoundEvents.AMBIENT_NETHER_WASTES_LOOP),
|
| 77 | Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_NETHER_WASTES_MOOD, 6000, 8, 2.0)),
|
| 78 | List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_NETHER_WASTES_ADDITIONS, 0.0111))
|
| 79 | )
|
| 80 | )
|
| 81 | .mobSpawnSettings(mobSpawnSettings)
|
| 82 | .generationSettings(generation.build())
|
| 83 | .build();
|
| 84 | }
|
| 85 |
|
| 86 | public static Biome soulSandValley(final HolderGetter<PlacedFeature> placedFeatures, final HolderGetter<WorldCarver> carvers) {
|
| 87 | double unitCharge = 0.7;
|
| 88 | double energyBudget = 0.15;
|
| 89 | MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
|
| 90 | .addSpawn(EntityTypes.SKELETON, 20, 5, 5)
|
| 91 | .addSpawn(EntityTypes.GHAST, 50, 4, 4)
|
| 92 | .addSpawn(EntityTypes.ENDERMAN, 1, 4, 4)
|
| 93 | .addSpawn(EntityTypes.STRIDER, 60, 1, 2)
|
| 94 | .addMobSpawnCost(EntityTypes.SKELETON, 0.7, 0.15)
|
| 95 | .addMobSpawnCost(EntityTypes.GHAST, 0.7, 0.15)
|
| 96 | .addMobSpawnCost(EntityTypes.ENDERMAN, 0.7, 0.15)
|
| 97 | .addMobSpawnCost(EntityTypes.STRIDER, 0.7, 0.15)
|
| 98 | .build();
|
| 99 | BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
|
| 100 | .addCarver(Carvers.NETHER_CAVE)
|
| 101 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, MiscOverworldPlacements.SPRING_LAVA)
|
| 102 | .addFeature(GenerationStep.Decoration.LOCAL_MODIFICATIONS, NetherPlacements.BASALT_PILLAR)
|
| 103 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_OPEN)
|
| 104 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
|
| 105 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_SOUL_FIRE)
|
| 106 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
|
| 107 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
|
| 108 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_CRIMSON_ROOTS)
|
| 109 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
|
| 110 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED)
|
| 111 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_SOUL_SAND);
|
| 112 | BiomeDefaultFeatures.addNetherDefaultOres(generation);
|
| 113 | return baseBiome()
|
| 114 | .setAttribute(EnvironmentAttributes.FOG_COLOR, ARGB.vector3fFromRGB24(-14989499))
|
| 115 | .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_SOUL_SAND_VALLEY))
|
| 116 | .modifyAttribute(EnvironmentAttributes.AMBIENT_PARTICLES, ListModifier.append(), AmbientParticle.of(ParticleTypes.ASH, 0.00625F))
|
| 117 | .setAttribute(
|
| 118 | EnvironmentAttributes.AMBIENT_SOUNDS,
|
| 119 | new AmbientSounds(
|
| 120 | Optional.of(SoundEvents.AMBIENT_SOUL_SAND_VALLEY_LOOP),
|
| 121 | Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_SOUL_SAND_VALLEY_MOOD, 6000, 8, 2.0)),
|
| 122 | List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_SOUL_SAND_VALLEY_ADDITIONS, 0.0111))
|
| 123 | )
|
| 124 | )
|
| 125 | .mobSpawnSettings(mobSpawnSettings)
|
| 126 | .generationSettings(generation.build())
|
| 127 | .build();
|
| 128 | }
|
| 129 |
|
| 130 | public static Biome basaltDeltas(final HolderGetter<PlacedFeature> placedFeatures, final HolderGetter<WorldCarver> carvers) {
|
| 131 | MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
|
| 132 | .addSpawn(EntityTypes.GHAST, 40, 1, 1)
|
| 133 | .addSpawn(EntityTypes.MAGMA_CUBE, 100, 2, 5)
|
| 134 | .addSpawn(EntityTypes.STRIDER, 60, 1, 2)
|
| 135 | .build();
|
| 136 | BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
|
| 137 | .addCarver(Carvers.NETHER_CAVE)
|
| 138 | .addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, NetherPlacements.DELTA)
|
| 139 | .addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, NetherPlacements.SMALL_BASALT_COLUMNS)
|
| 140 | .addFeature(GenerationStep.Decoration.SURFACE_STRUCTURES, NetherPlacements.LARGE_BASALT_COLUMNS)
|
| 141 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.BASALT_BLOBS)
|
| 142 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.BLACKSTONE_BLOBS)
|
| 143 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_DELTA)
|
| 144 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
|
| 145 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_SOUL_FIRE)
|
| 146 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
|
| 147 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
|
| 148 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, VegetationPlacements.BROWN_MUSHROOM_NETHER)
|
| 149 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, VegetationPlacements.RED_MUSHROOM_NETHER)
|
| 150 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
|
| 151 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED_DOUBLE)
|
| 152 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_GOLD_DELTAS)
|
| 153 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_QUARTZ_DELTAS);
|
| 154 | BiomeDefaultFeatures.addAncientDebris(generation);
|
| 155 | return baseBiome()
|
| 156 | .setAttribute(EnvironmentAttributes.FOG_COLOR, ARGB.vector3fFromRGB24(-9937040))
|
| 157 | .modifyAttribute(EnvironmentAttributes.AMBIENT_PARTICLES, ListModifier.append(), AmbientParticle.of(ParticleTypes.WHITE_ASH, 0.118093334F))
|
| 158 | .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_BASALT_DELTAS))
|
| 159 | .setAttribute(
|
| 160 | EnvironmentAttributes.AMBIENT_SOUNDS,
|
| 161 | new AmbientSounds(
|
| 162 | Optional.of(SoundEvents.AMBIENT_BASALT_DELTAS_LOOP),
|
| 163 | Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_BASALT_DELTAS_MOOD, 6000, 8, 2.0)),
|
| 164 | List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_BASALT_DELTAS_ADDITIONS, 0.0111))
|
| 165 | )
|
| 166 | )
|
| 167 | .mobSpawnSettings(mobSpawnSettings)
|
| 168 | .generationSettings(generation.build())
|
| 169 | .build();
|
| 170 | }
|
| 171 |
|
| 172 | public static Biome crimsonForest(final HolderGetter<PlacedFeature> placedFeatures, final HolderGetter<WorldCarver> carvers) {
|
| 173 | MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
|
| 174 | .addSpawn(EntityTypes.ZOMBIFIED_PIGLIN, 1, 2, 4)
|
| 175 | .addSpawn(EntityTypes.HOGLIN, 9, 3, 4)
|
| 176 | .addSpawn(EntityTypes.PIGLIN, 5, 3, 4)
|
| 177 | .addSpawn(EntityTypes.STRIDER, 60, 1, 2)
|
| 178 | .build();
|
| 179 | BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
|
| 180 | .addCarver(Carvers.NETHER_CAVE)
|
| 181 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, MiscOverworldPlacements.SPRING_LAVA);
|
| 182 | BiomeDefaultFeatures.addDefaultMushrooms(generation);
|
| 183 | generation.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_OPEN)
|
| 184 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
|
| 185 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
|
| 186 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
|
| 187 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
|
| 188 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED)
|
| 189 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.WEEPING_VINES)
|
| 190 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, TreePlacements.CRIMSON_FUNGI)
|
| 191 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.CRIMSON_FOREST_VEGETATION);
|
| 192 | BiomeDefaultFeatures.addNetherDefaultOres(generation);
|
| 193 | return baseBiome()
|
| 194 | .setAttribute(EnvironmentAttributes.FOG_COLOR, ARGB.vector3fFromRGB24(-13434109))
|
| 195 | .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_CRIMSON_FOREST))
|
| 196 | .modifyAttribute(EnvironmentAttributes.AMBIENT_PARTICLES, ListModifier.append(), AmbientParticle.of(ParticleTypes.CRIMSON_SPORE, 0.025F))
|
| 197 | .setAttribute(
|
| 198 | EnvironmentAttributes.AMBIENT_SOUNDS,
|
| 199 | new AmbientSounds(
|
| 200 | Optional.of(SoundEvents.AMBIENT_CRIMSON_FOREST_LOOP),
|
| 201 | Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_CRIMSON_FOREST_MOOD, 6000, 8, 2.0)),
|
| 202 | List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_CRIMSON_FOREST_ADDITIONS, 0.0111))
|
| 203 | )
|
| 204 | )
|
| 205 | .mobSpawnSettings(mobSpawnSettings)
|
| 206 | .generationSettings(generation.build())
|
| 207 | .build();
|
| 208 | }
|
| 209 |
|
| 210 | public static Biome warpedForest(final HolderGetter<PlacedFeature> placedFeatures, final HolderGetter<WorldCarver> carvers) {
|
| 211 | MobSpawnSettings mobSpawnSettings = new MobSpawnSettings.Builder()
|
| 212 | .addSpawn(EntityTypes.ENDERMAN, 1, 4, 4)
|
| 213 | .addSpawn(EntityTypes.STRIDER, 60, 1, 2)
|
| 214 | .addMobSpawnCost(EntityTypes.ENDERMAN, 1.0, 0.12)
|
| 215 | .build();
|
| 216 | BiomeGenerationSettings.Builder generation = new BiomeGenerationSettings.Builder(placedFeatures, carvers)
|
| 217 | .addCarver(Carvers.NETHER_CAVE)
|
| 218 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, MiscOverworldPlacements.SPRING_LAVA);
|
| 219 | BiomeDefaultFeatures.addDefaultMushrooms(generation);
|
| 220 | generation.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_OPEN)
|
| 221 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_FIRE)
|
| 222 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.PATCH_SOUL_FIRE)
|
| 223 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE_EXTRA)
|
| 224 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.GLOWSTONE)
|
| 225 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, OrePlacements.ORE_MAGMA)
|
| 226 | .addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, NetherPlacements.SPRING_CLOSED)
|
| 227 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, TreePlacements.WARPED_FUNGI)
|
| 228 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.WARPED_FOREST_VEGETATION)
|
| 229 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.NETHER_SPROUTS)
|
| 230 | .addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, NetherPlacements.TWISTING_VINES);
|
| 231 | BiomeDefaultFeatures.addNetherDefaultOres(generation);
|
| 232 | return baseBiome()
|
| 233 | .setAttribute(EnvironmentAttributes.FOG_COLOR, ARGB.vector3fFromRGB24(-15071974))
|
| 234 | .setAttribute(EnvironmentAttributes.BACKGROUND_MUSIC, new BackgroundMusic(SoundEvents.MUSIC_BIOME_WARPED_FOREST))
|
| 235 | .modifyAttribute(EnvironmentAttributes.AMBIENT_PARTICLES, ListModifier.append(), AmbientParticle.of(ParticleTypes.WARPED_SPORE, 0.01428F))
|
| 236 | .setAttribute(
|
| 237 | EnvironmentAttributes.AMBIENT_SOUNDS,
|
| 238 | new AmbientSounds(
|
| 239 | Optional.of(SoundEvents.AMBIENT_WARPED_FOREST_LOOP),
|
| 240 | Optional.of(new AmbientMoodSettings(SoundEvents.AMBIENT_WARPED_FOREST_MOOD, 6000, 8, 2.0)),
|
| 241 | List.of(new AmbientAdditionsSettings(SoundEvents.AMBIENT_WARPED_FOREST_ADDITIONS, 0.0111))
|
| 242 | )
|
| 243 | )
|
| 244 | .mobSpawnSettings(mobSpawnSettings)
|
| 245 | .generationSettings(generation.build())
|
| 246 | .build();
|
| 247 | }
|
| 248 | }
|
| 249 |
|