API init
This commit is contained in:
parent
cb16ea86b3
commit
9ebc7e906f
2 changed files with 15 additions and 9 deletions
|
@ -6,6 +6,7 @@ import net.fabricmc.loader.api.FabricLoader;
|
|||
import net.minecraft.resources.ResourceLocation;
|
||||
import ru.bclib.api.TagAPI;
|
||||
import ru.bclib.api.WorldDataAPI;
|
||||
import ru.bclib.api.biomes.BiomeAPI;
|
||||
import ru.bclib.api.dataexchange.DataExchangeAPI;
|
||||
import ru.bclib.api.dataexchange.handler.autosync.Chunker;
|
||||
import ru.bclib.api.dataexchange.handler.autosync.HelloClient;
|
||||
|
@ -48,6 +49,7 @@ public class BCLib implements ModInitializer {
|
|||
));
|
||||
|
||||
BCLibPatch.register();
|
||||
BiomeAPI.init();
|
||||
Configs.save();
|
||||
}
|
||||
|
||||
|
|
|
@ -105,8 +105,12 @@ public class BiomeAPI {
|
|||
|
||||
public static void init() {
|
||||
MutableInt integer = new MutableInt(0);
|
||||
BuiltinRegistries.BIOME.entrySet().forEach(entry -> {
|
||||
Biome biome = entry.getValue();
|
||||
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 -> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue