Use LifeCycle API
This commit is contained in:
parent
1593e7dc41
commit
19b48a87a4
2 changed files with 17 additions and 23 deletions
|
@ -2,7 +2,9 @@ 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.LifeCycleAPI;
|
||||
import ru.bclib.api.biomes.BiomeAPI;
|
||||
import ru.bclib.world.biomes.BCLBiome;
|
||||
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 || lastSeed != seed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue