Use new lifetime hook for level loading
This commit is contained in:
parent
ae615748b3
commit
c90540c33e
2 changed files with 19 additions and 25 deletions
|
@ -2,8 +2,10 @@ package ru.betterend.registry;
|
|||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import ru.bclib.api.BiomeAPI;
|
||||
import ru.bclib.api.LifeCycleAPI;
|
||||
import ru.bclib.world.biomes.BCLBiome;
|
||||
import ru.bclib.world.generator.BiomeMap;
|
||||
import ru.bclib.world.generator.BiomePicker;
|
||||
|
@ -74,9 +76,11 @@ public class EndBiomes {
|
|||
public static final EndCaveBiome LUSH_AURORA_CAVE = registerCaveBiome(new LushAuroraCaveBiome());
|
||||
public static final EndCaveBiome JADE_CAVE = registerCaveBiome(new JadeCaveBiome());
|
||||
|
||||
public static void register() {}
|
||||
public static void register() {
|
||||
LifeCycleAPI.onLevelLoad(EndBiomes::onWorldLoad);
|
||||
}
|
||||
|
||||
public static void onWorldLoad(long seed, Registry<Biome> registry) {
|
||||
private static void onWorldLoad(ServerLevel level, long seed, Registry<Biome> registry) {
|
||||
CAVE_BIOMES.getBiomes().forEach(biome -> biome.updateActualBiomes(registry));
|
||||
CAVE_BIOMES.rebuild();
|
||||
if (caveBiomeMap == null || caveBiomeMap.getSeed() != seed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue