SPIGOT-5877: Add scaffolding for custom dimensions and biomes

By: Martoph <sager1018@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2021-04-11 17:54:48 +10:00
parent 9fe10a5da5
commit 103e1bf3b5
4 changed files with 12 additions and 4 deletions

View File

@@ -499,11 +499,12 @@ public class CraftBlock implements Block {
return null;
}
return Registry.BIOME.get(CraftNamespacedKey.fromMinecraft(registry.getKey(base)));
Biome biome = Registry.BIOME.get(CraftNamespacedKey.fromMinecraft(registry.getKey(base)));
return (biome == null) ? Biome.CUSTOM : biome;
}
public static BiomeBase biomeToBiomeBase(IRegistry<BiomeBase> registry, Biome bio) {
if (bio == null) {
if (bio == null || bio == Biome.CUSTOM) {
return null;
}