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 ebdab5e706
commit 76557bf312
9 changed files with 51 additions and 31 deletions

View file

@ -298,7 +298,7 @@ public class ChunkSnapshot
bdata = new SimpleBitStorage(bdataPacked.length, 64, bdataPacked);
for (int j = 0; j < 64; j++) {
int b = bdata != null ? bdata.get(j) : 0;
cursect.biomes[j] = b < bpalette.size() ? BiomeMap.byBiomeName(bpalette.getString(b)).getBiomeID() : -1;
cursect.biomes[j] = b < bpalette.size() ? BiomeMap.byBiomeResourceLocation(bpalette.getString(b)).getBiomeID() : -1;
}
// Favor the Y=64 version
if ((secnum == 4) || (lastsectwithbiome == null)) {

View file

@ -1394,14 +1394,15 @@ public class DynmapPlugin
for (int i = 0; i < list.length; i++) {
Biome bb = list[i];
if (bb != null) {
String id = bb.toString();
String id = bb.getRegistryName().getPath();
String rl = bb.getRegistryName().toString();
float tmp = bb.getBaseTemperature(), hum = bb.getDownfall();
int watermult = bb.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++;
}