Tie in standard biomes by resource location

This commit is contained in:
Mike Primm 2021-12-04 23:01:13 -06:00
parent d7abb0e371
commit 635bbf2b4d
4 changed files with 123 additions and 97 deletions

View file

@ -1396,9 +1396,15 @@ public class DynmapPlugin
int watermult = bb.getWaterColor();
Log.verboseinfo("biome[" + i + "]: hum=" + hum + ", tmp=" + tmp + ", mult=" + Integer.toHexString(watermult));
BiomeMap bmap = BiomeMap.byBiomeID(i);
if ((rl != null) || bmap.isDefault()) {
bmap = new BiomeMap(i, id, tmp, hum, rl);
BiomeMap bmap = BiomeMap.NULL;
if (rl != null) { // If resource location, lookup by this
bmap = BiomeMap.byBiomeResourceLocation(rl);
}
if (bmap == BiomeMap.NULL) {
bmap = BiomeMap.byBiomeID(i);
}
if (bmap.isDefault()) { // If matched default, replace with new one
bmap = new BiomeMap((rl != null) ? BiomeMap.NO_INDEX : i, id, tmp, hum, rl);
Log.verboseinfo("Add custom biome [" + bmap.toString() + "] (" + i + ")");
cnt++;
}