Fix 1.14 biome shading

This commit is contained in:
Mike Primm 2019-06-05 19:36:54 -05:00
parent 8bc03f41b0
commit a2af65add6
3 changed files with 18 additions and 33 deletions

View File

@ -214,14 +214,6 @@ 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++) {
@ -231,7 +223,6 @@ public class MapChunkCache114_1 extends AbstractMapChunkCache {
}
}
}
}
public int getX()
{
@ -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

View File

@ -214,14 +214,6 @@ 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++) {
@ -231,7 +223,6 @@ public class MapChunkCache114 extends AbstractMapChunkCache {
}
}
}
}
public int getX()
{
@ -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

View File

@ -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);