aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknameColor.java3
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknamePrefix.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java7
3 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknameColor.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknameColor.java
index 02bad9f1..bf91a925 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknameColor.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknameColor.java
@@ -22,6 +22,7 @@ import kr.syeyoung.dungeonsguide.config.guiconfig.ConfigPanelCreator;
import kr.syeyoung.dungeonsguide.config.guiconfig.GuiConfig;
import kr.syeyoung.dungeonsguide.features.FeatureParameter;
import kr.syeyoung.dungeonsguide.features.SimpleFeature;
+import net.minecraft.util.EnumChatFormatting;
public class FeatureNicknameColor extends SimpleFeature {
public FeatureNicknameColor() {
@@ -38,7 +39,7 @@ public class FeatureNicknameColor extends SimpleFeature {
"§dFrom §r§r§a[RANK§r§6+§r§a] %prefix%%name%§r§7: §r§7TEST§r",
"§r§b[RANK§c+§b] %prefix%%name%§f: TEST",
"§r§bCo-op > §r§a[RANK§6+§a] %prefix%%name%§f: §rTEST§r"
- }));
+ }, a -> (a+"Color "+(a.equals("§z") ? "(Rainbow on sba)" : ""))));
return "base." + getKey();
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknamePrefix.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknamePrefix.java
index 5ffcc26b..911ee862 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknamePrefix.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/FeatureNicknamePrefix.java
@@ -46,7 +46,7 @@ public class FeatureNicknamePrefix extends SimpleFeature {
"§dFrom §r%prefix% §r§a[RANK§r§6+§r§a] %name%§r§7: §r§7TEST§r",
"§r%prefix% §b[RANK§c+§b] %name%§f: TEST",
"§r§bCo-op > §r%prefix% §a[RANK§6+§a] %name%§f: §rTEST§r"
- }));
+ }, a->a));
return "base." + getKey();
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java
index dd0dc387..566229e1 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/cosmetics/PrefixSelectorGUI.java
@@ -34,16 +34,19 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.UUID;
+import java.util.function.Function;
import java.util.stream.Collectors;
public class PrefixSelectorGUI extends MPanel {
private GuiConfig config;
private String cosmeticType;
+ private Function<String, String> optionTransformer;
- public PrefixSelectorGUI(GuiConfig config, String cosmeticType, String[] previews) {
+ public PrefixSelectorGUI(GuiConfig config, String cosmeticType, String[] previews, Function<String, String> optionTransformer) {
this.config = config;
this.cosmeticType = cosmeticType;
this.previews = previews;
+ this.optionTransformer = optionTransformer;
CosmeticsManager cosmeticsManager = DungeonsGuide.getDungeonsGuide().getCosmeticsManager();
List<ActiveCosmetic> activeCosmeticList = cosmeticsManager.getActiveCosmeticByPlayer().computeIfAbsent(Minecraft.getMinecraft().thePlayer.getGameProfile().getId(), (a) -> new ArrayList<>());
for (ActiveCosmetic activeCosmetic : activeCosmeticList) {
@@ -104,7 +107,7 @@ public class PrefixSelectorGUI extends MPanel {
if (value.getCosmeticType().equals(cosmeticType)) {
Gui.drawRect(0,0,220, fr.FONT_HEIGHT+3, 0xFF222222);
Gui.drawRect(1,1, 219, fr.FONT_HEIGHT+2, 0xFF555555);
- fr.drawString(value.getData(), 2, 2, -1);
+ fr.drawString(optionTransformer.apply(value.getData()), 2, 2, -1);
Gui.drawRect(120,1,160, fr.FONT_HEIGHT+2, new Rectangle(120,cnt * (fr.FONT_HEIGHT+4) + 2,40,fr.FONT_HEIGHT+1).contains(relX, relY) ? 0xFF859DF0 : 0xFF7289da);
fr.drawString("TEST", (280-fr.getStringWidth("TEST"))/2, 2, -1);