Biome shading fixes for 1.18 (Spigot, Fabric, Forge)

This commit is contained in:
Mike Primm 2021-12-02 22:18:03 -06:00
parent 34ed98637f
commit e4a3179570
9 changed files with 51 additions and 31 deletions

View file

@ -285,7 +285,7 @@ public class ChunkSnapshot {
bdata = new PackedIntegerArray(bdataPacked.length, 64, bdataPacked);
for (int j = 0; j < 64; j++) {
int b = bdata != null ? bdata.get(j) : 0;
biomes[j] = b < bpalette.size() ? BiomeMap.byBiomeName(bpalette.getString(b)).getBiomeID() : -1;
biomes[j] = b < bpalette.size() ? BiomeMap.byBiomeResourceLocation(bpalette.getString(b)).getBiomeID() : -1;
}
}
}

View file

@ -376,13 +376,14 @@ public class DynmapPlugin {
Biome bb = list[i];
if (bb != null) {
String id = biomeRegistry.getId(bb).getPath();
String rl = biomeRegistry.getId(bb).toString();
float tmp = bb.getTemperature(), hum = bb.getDownfall();
int watermult = ((BiomeEffectsAccessor) bb.getEffects()).getWaterColor();
Log.verboseinfo("biome[" + i + "]: hum=" + hum + ", tmp=" + tmp + ", mult=" + Integer.toHexString(watermult));
BiomeMap bmap = BiomeMap.byBiomeID(i);
if (bmap.isDefault()) {
bmap = new BiomeMap(i, id, tmp, hum);
if ((rl != null) || bmap.isDefault()) {
bmap = new BiomeMap(i, id, tmp, hum, rl);
Log.verboseinfo("Add custom biome [" + bmap.toString() + "] (" + i + ")");
cnt++;
} else {