Small change

This commit is contained in:
2026-03-06 01:15:47 +01:00
parent e70c1423a4
commit 53332157e3
2 changed files with 7 additions and 1 deletions
@@ -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();