aboutsummaryrefslogtreecommitdiff
path: root/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/utils/ImmutableLiteralText.java
diff options
context:
space:
mode:
Diffstat (limited to 'RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/utils/ImmutableLiteralText.java')
-rw-r--r--RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/utils/ImmutableLiteralText.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/utils/ImmutableLiteralText.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/utils/ImmutableLiteralText.java
index a13aa6dd6..0da3d19f8 100644
--- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/utils/ImmutableLiteralText.java
+++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/utils/ImmutableLiteralText.java
@@ -34,7 +34,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Optional;
-public final class ImmutableLiteralText implements Component {
+public final class ImmutableLiteralText implements MutableComponent {
public static final ImmutableLiteralText EMPTY = new ImmutableLiteralText("");
private final String content;
private FormattedCharSequence orderedText;
@@ -60,7 +60,7 @@ public final class ImmutableLiteralText implements Component {
@Override
public MutableComponent plainCopy() {
- return new TextComponent(content);
+ return this;
}
@Override
@@ -85,4 +85,14 @@ public final class ImmutableLiteralText implements Component {
}
return orderedText;
}
+
+ @Override
+ public MutableComponent setStyle(Style style) {
+ return new TextComponent(content).withStyle(style);
+ }
+
+ @Override
+ public MutableComponent append(Component component) {
+ return new TextComponent(content).append(component);
+ }
}