mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-24 01:27:37 +01:00
Fix 1.14 biome shading
This commit is contained in:
parent
8bc03f41b0
commit
a2af65add6
@ -214,21 +214,12 @@ public class MapChunkCache114_1 extends AbstractMapChunkCache {
|
||||
/* Get biome data */
|
||||
this.biome = new int[COLUMNS_PER_CHUNK];
|
||||
if (nbt.hasKey("Biomes")) {
|
||||
byte[] b = nbt.getByteArray("Biomes");
|
||||
if (b != null) {
|
||||
for (int i = 0; i < b.length; i++) {
|
||||
int bv = 255 & b[i];
|
||||
this.biome[i] = (bv == 255) ? 0 : bv;
|
||||
}
|
||||
}
|
||||
else { // Check JEI biomes
|
||||
int[] bb = nbt.getIntArray("Biomes");
|
||||
if (bb != null) {
|
||||
for (int i = 0; i < bb.length; i++) {
|
||||
int bv = bb[i];
|
||||
this.biome[i] = (bv < 0) ? 0 : bv;
|
||||
}
|
||||
}
|
||||
int[] bb = nbt.getIntArray("Biomes");
|
||||
if (bb != null) {
|
||||
for (int i = 0; i < bb.length; i++) {
|
||||
int bv = bb[i];
|
||||
this.biome[i] = (bv < 0) ? 0 : bv;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -279,7 +270,7 @@ public class MapChunkCache114_1 extends AbstractMapChunkCache {
|
||||
|
||||
@Override
|
||||
public Biome getBiome(int x, int z) {
|
||||
return AbstractMapChunkCache.getBiomeByID(z << 4 | x);
|
||||
return AbstractMapChunkCache.getBiomeByID(biome[z << 4 | x]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -214,22 +214,13 @@ public class MapChunkCache114 extends AbstractMapChunkCache {
|
||||
/* Get biome data */
|
||||
this.biome = new int[COLUMNS_PER_CHUNK];
|
||||
if (nbt.hasKey("Biomes")) {
|
||||
byte[] b = nbt.getByteArray("Biomes");
|
||||
if (b != null) {
|
||||
for (int i = 0; i < b.length; i++) {
|
||||
int bv = 255 & b[i];
|
||||
this.biome[i] = (bv == 255) ? 0 : bv;
|
||||
}
|
||||
}
|
||||
else { // Check JEI biomes
|
||||
int[] bb = nbt.getIntArray("Biomes");
|
||||
if (bb != null) {
|
||||
for (int i = 0; i < bb.length; i++) {
|
||||
int bv = bb[i];
|
||||
this.biome[i] = (bv < 0) ? 0 : bv;
|
||||
}
|
||||
}
|
||||
}
|
||||
int[] bb = nbt.getIntArray("Biomes");
|
||||
if (bb != null) {
|
||||
for (int i = 0; i < bb.length; i++) {
|
||||
int bv = bb[i];
|
||||
this.biome[i] = (bv < 0) ? 0 : bv;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,7 +270,7 @@ public class MapChunkCache114 extends AbstractMapChunkCache {
|
||||
|
||||
@Override
|
||||
public Biome getBiome(int x, int z) {
|
||||
return AbstractMapChunkCache.getBiomeByID(z << 4 | x);
|
||||
return AbstractMapChunkCache.getBiomeByID(biome[z << 4 | x]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -746,6 +746,7 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
BiomeMap.loadWellKnownByVersion(mcver);
|
||||
/* Find array of biomes in biomebase */
|
||||
Object[] biomelist = helper.getBiomeBaseList();
|
||||
Log.verboseinfo("biomelist length = " + biomelist.length);
|
||||
/* Loop through list, skipping well known biomes */
|
||||
for(int i = 0; i < biomelist.length; i++) {
|
||||
Object bb = biomelist[i];
|
||||
@ -753,6 +754,8 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
float tmp = helper.getBiomeBaseTemperature(bb);
|
||||
float hum = helper.getBiomeBaseHumidity(bb);
|
||||
int watermult = helper.getBiomeBaseWaterMult(bb);
|
||||
Log.verboseinfo("biome[" + i + "]: hum=" + hum + ", tmp=" + tmp + ", mult=" + Integer.toHexString(watermult));
|
||||
|
||||
BiomeMap bmap = BiomeMap.byBiomeID(i);
|
||||
if (bmap.isDefault()) {
|
||||
String id = helper.getBiomeBaseIDString(bb);
|
||||
|
Loading…
Reference in New Issue
Block a user