From f91a8eb76429166e4f3bee2c090c567ce5affe5a Mon Sep 17 00:00:00 2001 From: Brianna Date: Fri, 27 Mar 2020 16:45:42 -0400 Subject: [PATCH] CompatibleBiome updates. --- .../com/songoda/core/compatibility/CompatibleBiome.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Core/src/main/java/com/songoda/core/compatibility/CompatibleBiome.java b/Core/src/main/java/com/songoda/core/compatibility/CompatibleBiome.java index 67d6e5c7..43373d54 100644 --- a/Core/src/main/java/com/songoda/core/compatibility/CompatibleBiome.java +++ b/Core/src/main/java/com/songoda/core/compatibility/CompatibleBiome.java @@ -122,6 +122,13 @@ public enum CompatibleBiome { return new LinkedList<>(versions); } + public Biome getBiome() { + for (Version version : versions) + if (ServerVersion.isServerVersionAtLeast(version.version)) + return Biome.valueOf(version.biome); + return null; + } + public static CompatibleBiome getBiome(Biome biome) { return biome == null ? null : lookupMap.get(biome.name()); }