From 0706a4f52d768fbb485c5c0000ffc8d187703bbe Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sat, 25 Apr 2020 23:25:50 +0300 Subject: Use better text wrapping --- src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java index 2522644..e9c34e7 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java @@ -10,6 +10,7 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.font.TextRenderer; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.util.Texts; +import net.minecraft.text.Style; import net.minecraft.text.Text; import javax.annotation.Nullable; @@ -48,7 +49,7 @@ public class WText extends WWidget { @Environment(EnvType.CLIENT) private void wrapLines() { TextRenderer font = MinecraftClient.getInstance().textRenderer; - wrappedLines = Texts.wrapLines(text, width, font); + wrappedLines = font.method_27527().method_27491(text, width, Style.field_24360, false); } @Environment(EnvType.CLIENT) -- cgit