Small change
This commit is contained in:
@@ -26,6 +26,11 @@ public class Fonts {
|
||||
Style.EMPTY.withFont(font));
|
||||
}
|
||||
|
||||
public static Text setFont(String text, int font) {
|
||||
return Text.literal(text).setStyle(
|
||||
Style.EMPTY.withFont(getFont(font)));
|
||||
}
|
||||
|
||||
public static int getWidth(String text, int font) {
|
||||
int w = 0;
|
||||
for (String line : text.split("\n")) {
|
||||
|
||||
@@ -123,7 +123,8 @@ public class RenderScope {
|
||||
matrices.translate(x, y + (i * Fonts.getHeight()), 0);
|
||||
matrices.scale(scale, scale, 1.0f);
|
||||
TextRenderer textRenderer = SaturnClient.client.textRenderer;
|
||||
textRenderer.draw(Fonts.setFont(line, Fonts.getFont(font)), 0, font == 0 ? 1 : 7, color, false,
|
||||
textRenderer.draw(org.saturnclient.saturnclient.impl.Fonts.setFont(line, font), 0,
|
||||
font == 0 ? 1 : 7, color, false,
|
||||
this.matrices.peek().getPositionMatrix(),
|
||||
this.vertexConsumers, TextLayerType.NORMAL, 0, 15728880);
|
||||
matrices.pop();
|
||||
|
||||
Reference in New Issue
Block a user