Server mixin & biome source init, cleanup

This commit is contained in:
paulevsGitch 2021-06-01 10:43:38 +03:00
parent b7eab022fb
commit 1d91f8473e
25 changed files with 107 additions and 40 deletions

View file

@ -32,13 +32,11 @@ public class BiomeAPI {
private static Registry<Biome> biomeRegistry;
/**
* Initialize registry if it was not initialized in world generation (when using mods/datapacks, that overrides the End generation)
* Initialize registry for current server.
* @param server - {@link MinecraftServer}
*/
public static void initRegistry(MinecraftServer server) {
if (biomeRegistry == null || biomeRegistry == BuiltinRegistries.BIOME) {
biomeRegistry = server.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
}
biomeRegistry = server.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
}
public static void registerBiomeDirectly(BCLBiome biome) {