mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-27 20:58:40 +01:00
Fix biome temp/humidity on newer biomes
This commit is contained in:
parent
274a363a97
commit
41d1de1fbb
@ -718,19 +718,24 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
Object[] biomelist = helper.getBiomeBaseList();
|
||||
/* Loop through list, skipping well known biomes */
|
||||
for(int i = 0; i < biomelist.length; i++) {
|
||||
if (!BiomeMap.byBiomeID(i).isDefault()) continue;
|
||||
Object bb = biomelist[i];
|
||||
if(bb != null) {
|
||||
String id = helper.getBiomeBaseIDString(bb);
|
||||
if(id == null) {
|
||||
id = "BIOME_" + i;
|
||||
}
|
||||
float tmp = helper.getBiomeBaseTemperature(bb);
|
||||
float hum = helper.getBiomeBaseHumidity(bb);
|
||||
|
||||
BiomeMap m = new BiomeMap(i, id, tmp, hum);
|
||||
Log.verboseinfo("Add custom biome [" + m.toString() + "] (" + i + ")");
|
||||
cnt++;
|
||||
BiomeMap bmap = BiomeMap.byBiomeID(i);
|
||||
if (bmap.isDefault()) {
|
||||
String id = helper.getBiomeBaseIDString(bb);
|
||||
if(id == null) {
|
||||
id = "BIOME_" + i;
|
||||
}
|
||||
BiomeMap m = new BiomeMap(i, id, tmp, hum);
|
||||
Log.verboseinfo("Add custom biome [" + m.toString() + "] (" + i + ")");
|
||||
cnt++;
|
||||
}
|
||||
else {
|
||||
bmap.setTemperature(tmp);
|
||||
bmap.setRainfall(hum);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cnt > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user