diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-04-25 23:25:50 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2020-04-25 23:25:50 +0300 |
commit | 0706a4f52d768fbb485c5c0000ffc8d187703bbe (patch) | |
tree | 489211f1d49d9c2f0f7607f6118c0218c5e2f682 /src | |
parent | a1388bf8fa33d888e71b07f26768208dca853a79 (diff) | |
download | LibGui-0706a4f52d768fbb485c5c0000ffc8d187703bbe.tar.gz LibGui-0706a4f52d768fbb485c5c0000ffc8d187703bbe.tar.bz2 LibGui-0706a4f52d768fbb485c5c0000ffc8d187703bbe.zip |
Use better text wrapping
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java | 3 |
1 files changed, 2 insertions, 1 deletions
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) |