Fixed caves crash with non-be biome source (issue #148)

This commit is contained in:
paulevsGitch 2021-04-29 01:08:57 +03:00
parent 16b02e15bf
commit 9999abf945
3 changed files with 21 additions and 7 deletions

View file

@ -112,7 +112,9 @@ public class EndBiomes {
public static final EndCaveBiome EMPTY_AURORA_CAVE = registerCaveBiome(new EmptyAuroraCaveBiome());
public static final EndCaveBiome LUSH_AURORA_CAVE = registerCaveBiome(new LushAuroraCaveBiome());
public static void register() {}
public static void register() {
CAVE_BIOMES.rebuild();
}
public static void mutateRegistry(Registry<Biome> biomeRegistry) {
EndBiomes.biomeRegistry = biomeRegistry;
@ -407,6 +409,15 @@ public class EndBiomes {
public static EndBiome getBiome(ResourceLocation biomeID) {
return ID_MAP.getOrDefault(biomeID, END);
}
public static Biome getActualBiome(EndBiome biome) {
Biome actual = biome.getActualBiome();
if (actual == null) {
biome.updateActualBiomes(biomeRegistry);
actual = biome.getActualBiome();
}
return actual;
}
public static List<EndBiome> getModBiomes() {
List<EndBiome> result = Lists.newArrayList();