1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-21 07:44:49 +00:00

Merge branch 'mc-1.14.x' into mc-1.15.x

This commit is contained in:
SquidDev
2020-05-04 10:05:32 +01:00
34 changed files with 550 additions and 528 deletions

View File

@@ -46,10 +46,9 @@ public final class FixedWidthFontRenderer
return (float) ((rgb[0] + rgb[1] + rgb[2]) / 3);
}
private static int getColour( char c )
private static int getColour( char c, Colour def )
{
int i = "0123456789abcdef".indexOf( c );
return i < 0 ? 0 : 15 - i;
return 15 - Terminal.getColour( c, def );
}
private static void drawChar( Matrix4f transform, IVertexBuilder buffer, float x, float y, int index, float r, float g, float b )
@@ -83,7 +82,7 @@ public final class FixedWidthFontRenderer
private static void drawQuad( Matrix4f transform, IVertexBuilder buffer, float x, float y, float width, float height, Palette palette, boolean greyscale, char colourIndex )
{
double[] colour = palette.getColour( getColour( colourIndex ) );
double[] colour = palette.getColour( getColour( colourIndex, Colour.BLACK ) );
float r, g, b;
if( greyscale )
{
@@ -151,7 +150,7 @@ public final class FixedWidthFontRenderer
for( int i = 0; i < text.length(); i++ )
{
double[] colour = palette.getColour( 15 - "0123456789abcdef".indexOf( textColour.charAt( i ) ) );
double[] colour = palette.getColour( getColour( textColour.charAt( i ), Colour.BLACK ) );
float r, g, b;
if( greyscale )
{