Fix biome temp/humidity on newer biomes
This commit is contained in:
parent
2aa65bdfed
commit
ecedd7d917
1 changed files with 14 additions and 9 deletions
|
|
@ -718,19 +718,24 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||||
Object[] biomelist = helper.getBiomeBaseList();
|
Object[] biomelist = helper.getBiomeBaseList();
|
||||||
/* Loop through list, skipping well known biomes */
|
/* Loop through list, skipping well known biomes */
|
||||||
for(int i = 0; i < biomelist.length; i++) {
|
for(int i = 0; i < biomelist.length; i++) {
|
||||||
if (!BiomeMap.byBiomeID(i).isDefault()) continue;
|
|
||||||
Object bb = biomelist[i];
|
Object bb = biomelist[i];
|
||||||
if(bb != null) {
|
if(bb != null) {
|
||||||
String id = helper.getBiomeBaseIDString(bb);
|
|
||||||
if(id == null) {
|
|
||||||
id = "BIOME_" + i;
|
|
||||||
}
|
|
||||||
float tmp = helper.getBiomeBaseTemperature(bb);
|
float tmp = helper.getBiomeBaseTemperature(bb);
|
||||||
float hum = helper.getBiomeBaseHumidity(bb);
|
float hum = helper.getBiomeBaseHumidity(bb);
|
||||||
|
BiomeMap bmap = BiomeMap.byBiomeID(i);
|
||||||
BiomeMap m = new BiomeMap(i, id, tmp, hum);
|
if (bmap.isDefault()) {
|
||||||
Log.verboseinfo("Add custom biome [" + m.toString() + "] (" + i + ")");
|
String id = helper.getBiomeBaseIDString(bb);
|
||||||
cnt++;
|
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) {
|
if(cnt > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue