This commit is contained in:
paulevsGitch 2021-12-07 21:15:40 +03:00
parent cb16ea86b3
commit 9ebc7e906f
2 changed files with 15 additions and 9 deletions

View file

@ -105,17 +105,21 @@ public class BiomeAPI {
public static void init() {
MutableInt integer = new MutableInt(0);
BuiltinRegistries.BIOME.entrySet().forEach(entry -> {
Biome biome = entry.getValue();
BiomeGenerationSettingsAccessor accessor = BiomeGenerationSettingsAccessor.class.cast(biome.getGenerationSettings());
List<List<Supplier<PlacedFeature>>> features = accessor.bclib_getFeatures();
features.forEach(step -> {
step.forEach(provider -> {
PlacedFeature feature = provider.get();
FEATURE_ORDER.computeIfAbsent(feature, f -> integer.getAndIncrement());
BuiltinRegistries.BIOME
.entrySet()
.stream()
.filter(entry -> entry.getKey().location().getNamespace().equals("minecraft"))
.map(entry -> entry.getValue())
.forEach(biome -> {
BiomeGenerationSettingsAccessor accessor = BiomeGenerationSettingsAccessor.class.cast(biome.getGenerationSettings());
List<List<Supplier<PlacedFeature>>> features = accessor.bclib_getFeatures();
features.forEach(step -> {
step.forEach(provider -> {
PlacedFeature feature = provider.get();
FEATURE_ORDER.computeIfAbsent(feature, f -> integer.getAndIncrement());
});
});
});
});
}
/**