13
0
geforkt von Mirrors/Paper

Fix new map colors rendering as transparent

By: DerFrZocker <derrieple@gmail.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2021-06-12 19:56:13 +10:00
Ursprung d57a6b8cc2
Commit f359c7a3ec
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -164,8 +164,8 @@ public final class CraftMapView implements MapView {
byte[] buf = canvas.getBuffer();
for (int i = 0; i < buf.length; ++i) {
byte color = buf[i];
// There are 208 valid color id's, 0 -> 127 and -128 -> -49
if (color >= 0 || color <= -21) render.buffer[i] = color;
// There are 248 valid color id's, 0 -> 127 and -128 -> -9
if (color >= 0 || color <= -9) render.buffer[i] = color;
}
for (int i = 0; i < canvas.getCursors().size(); ++i) {

Datei anzeigen

@ -34,7 +34,7 @@ public class MapTest {
int mr = (r * modi) / 255;
int mg = (g * modi) / 255;
int mb = (b * modi) / 255;
logger.log(Level.WARNING, "Missing color: c({0}, {1}, {2})", new Object[]{mr, mg, mb});
logger.log(Level.WARNING, "Missing color (check CraftMapView#render): c({0}, {1}, {2})", new Object[]{mr, mg, mb});
}
fail = true;
} else {