13
0
geforkt von Mirrors/Paper

SPIGOT-6646: Issue with map palette ranges

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2021-07-15 20:32:47 +10:00
Ursprung 64a83e2da9
Commit 16922e92de

Datei anzeigen

@ -263,11 +263,7 @@ public final class MapPalette {
@Deprecated @Deprecated
@NotNull @NotNull
public static Color getColor(byte index) { public static Color getColor(byte index) {
if ((index > -21 && index < 0) || index > 127) { // Minecraft has 143 colors, some of which have negative byte representations
throw new IndexOutOfBoundsException(); return colors[index >= 0 ? index : index + 256];
} else {
// Minecraft has 143 colors, some of which have negative byte representations
return colors[index >= 0 ? index : index + 256];
}
} }
} }