Make sure Dimensions without BiomeModifications still get Features
This commit is contained in:
parent
aef34d30da
commit
c0ce7f6e35
1 changed files with 8 additions and 9 deletions
|
@ -515,14 +515,11 @@ public class BiomeAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<BiConsumer<ResourceLocation, Biome>> modifications = MODIFICATIONS.get(level.dimension());
|
List<BiConsumer<ResourceLocation, Biome>> modifications = MODIFICATIONS.get(level.dimension());
|
||||||
if (modifications == null) {
|
for (Biome biome : biomes) {
|
||||||
biomes.forEach(biome -> sortBiomeFeatures(biome));
|
applyModificationsToBiome(modifications, biome);
|
||||||
} else {
|
|
||||||
biomes.forEach(biome -> {
|
|
||||||
applyModificationsToBiome(modifications, biome);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (generator != null) {
|
if (generator != null) {
|
||||||
final SurfaceRuleProvider provider = SurfaceRuleProvider.class.cast(generator);
|
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
|
// 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) {
|
private static void applyModificationsToBiome(List<BiConsumer<ResourceLocation, Biome>> modifications, Biome biome) {
|
||||||
ResourceLocation biomeID = getBiomeID(biome);
|
ResourceLocation biomeID = getBiomeID(biome);
|
||||||
modifications.forEach(consumer -> {
|
if (modifications!=null) {
|
||||||
consumer.accept(biomeID, biome);
|
modifications.forEach(consumer -> {
|
||||||
});
|
consumer.accept(biomeID, biome);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
final BCLBiome bclBiome = BiomeAPI.getBiome(biome);
|
final BCLBiome bclBiome = BiomeAPI.getBiome(biome);
|
||||||
if (bclBiome != null) {
|
if (bclBiome != null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue