Make sure Dimensions without BiomeModifications still get Features

This commit is contained in:
Frank 2022-02-04 16:28:41 +01:00
parent aef34d30da
commit c0ce7f6e35

View file

@ -515,14 +515,11 @@ public class BiomeAPI {
}
List<BiConsumer<ResourceLocation, Biome>> modifications = MODIFICATIONS.get(level.dimension());
if (modifications == null) {
biomes.forEach(biome -> sortBiomeFeatures(biome));
} else {
biomes.forEach(biome -> {
applyModificationsToBiome(modifications, biome);
});
for (Biome biome : biomes) {
applyModificationsToBiome(modifications, biome);
}
if (generator != null) {
final SurfaceRuleProvider provider = SurfaceRuleProvider.class.cast(generator);
// Multiple Biomes can use the same generator. So we need to keep track of all Biomes that are
@ -550,9 +547,11 @@ public class BiomeAPI {
private static void applyModificationsToBiome(List<BiConsumer<ResourceLocation, Biome>> modifications, Biome biome) {
ResourceLocation biomeID = getBiomeID(biome);
modifications.forEach(consumer -> {
consumer.accept(biomeID, biome);
});
if (modifications!=null) {
modifications.forEach(consumer -> {
consumer.accept(biomeID, biome);
});
}
final BCLBiome bclBiome = BiomeAPI.getBiome(biome);
if (bclBiome != null) {