Skip to content

Commit

Permalink
fix text
Browse files Browse the repository at this point in the history
  • Loading branch information
Faithcaio committed Nov 22, 2023
1 parent c6ebb66 commit f374fc0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import net.minecraft.network.chat.ComponentContents;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.chat.Style;
import net.minecraft.network.chat.contents.LiteralContents;
import net.minecraft.network.chat.contents.PlainTextContents;
import net.minecraft.util.FormattedCharSequence;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
Expand Down Expand Up @@ -115,7 +115,7 @@ public String getString(final int length) {
@Override
public ComponentContents getContents() {
if (this.wrapped instanceof final TextComponent tc) {
return new LiteralContents(tc.content());
return PlainTextContents.create(tc.content());
} else {
return this.deepConverted().getContents();
}
Expand Down

0 comments on commit f374fc0

Please sign in to comment.