diff options
author | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-06-14 22:24:22 -0700 |
---|---|---|
committer | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-06-14 22:24:22 -0700 |
commit | ee81f0ac1cb848609a755a875f5df0f5d51fa881 (patch) | |
tree | 76522b793e92f971f324be7935710c4b3b59ba1f /src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java | |
parent | 15a3b944d13e54f4241df78b199403d414b9bd69 (diff) | |
download | Iceberg-ee81f0ac1cb848609a755a875f5df0f5d51fa881.tar.gz Iceberg-ee81f0ac1cb848609a755a875f5df0f5d51fa881.tar.bz2 Iceberg-ee81f0ac1cb848609a755a875f5df0f5d51fa881.zip |
Initial port to 1.19.
Disabled Config Menus for Forge support until it has a 1.19 version.
Disabled AutoRegistry since Forge broke it.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java')
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java b/src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java index 4ad448d..bf87e67 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java +++ b/src/main/java/com/anthonyhilyard/iceberg/util/StringRecomposer.java @@ -8,7 +8,7 @@ import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent import net.minecraft.network.chat.FormattedText; import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.chat.Style; -import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.Component; import net.minecraft.util.FormattedCharSink; public class StringRecomposer @@ -31,7 +31,7 @@ public class StringRecomposer private static class RecomposerSink implements FormattedCharSink { private StringBuilder builder = new StringBuilder(); - private MutableComponent text = new TextComponent("").withStyle(Style.EMPTY); + private MutableComponent text = Component.literal("").withStyle(Style.EMPTY); @Override public boolean accept(int index, Style style, int charCode) @@ -40,7 +40,7 @@ public class StringRecomposer if (!style.equals(text.getStyle())) { - text.append(new TextComponent(builder.toString()).withStyle(style)); + text.append(Component.literal(builder.toString()).withStyle(style)); builder.setLength(0); } return true; @@ -48,7 +48,7 @@ public class StringRecomposer public FormattedText getFormattedText() { - text.append(new TextComponent(builder.toString()).withStyle(text.getStyle())); + text.append(Component.literal(builder.toString()).withStyle(text.getStyle())); return text; } } |