Merge pull request #3685 from ein-stein-chen/fix-biome-color-loading

Fix loading of biome colorschemes
This commit is contained in:
mikeprimm 2022-02-21 18:45:25 -06:00 committed by GitHub
commit b6d0c816a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -128,7 +128,7 @@ public class ColorScheme {
id = -1; id = -1;
BiomeMap[] bm = BiomeMap.values(); BiomeMap[] bm = BiomeMap.values();
for (int i = 0; i < bm.length; i++) { for (int i = 0; i < bm.length; i++) {
if (bm[i].toString().equalsIgnoreCase(bio)) { if (bm[i].getId().equalsIgnoreCase(bio)) {
id = i; id = i;
break; break;
} else if (bio.equalsIgnoreCase("BIOME_" + i)) { } else if (bio.equalsIgnoreCase("BIOME_" + i)) {

View File

@ -297,6 +297,9 @@ public class BiomeMap {
public boolean isDefault() { public boolean isDefault() {
return isDef; return isDef;
} }
public String getId() {
return id;
}
public String toString() { public String toString() {
return String.format("%s(%s)", id, resourcelocation); return String.format("%s(%s)", id, resourcelocation);
} }