Skip to content

Commit 7b4ed08

Browse files
committed
Wait a new hysentials update?
1 parent 8fd30f1 commit 7b4ed08

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed

src/main/java/llc/redstone/hysentials/handlers/chat/modules/bwranks/BWSReplace.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void onMessageReceived(@NotNull ClientChatReceivedEvent event) {
8585
boolean found = m1.find();
8686
if (found || m2.find()) {
8787
Matcher m = found ? m1 : m2;
88-
String color = C.toHex(m.group(1)).replace("#", "");
88+
String color = C.toHex(m.group(1), false);
8989
String num = C.removeColor(m.group(2));
9090
String symbol = m.group(3);
9191
if (ChatConfig.levelPrefixColors) {

src/main/java/llc/redstone/hysentials/mixin/fancyformatting/ImageIconsMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private void renderStringAtPosReplace(String text, boolean shadow, CallbackInfo
9595
}
9696
case NUMBER: {
9797
Number number = (Number) format.getValue();
98-
float y = this.posY - 1;
98+
float y = this.posY;
9999
float positionAdd = ImageIconRenderer.renderNumberedString(number.getNumber(), number.getHex(), this.posX, y, textColor, shadow, alpha);
100100
if (positionAdd > 0) {
101101
this.posX += positionAdd;

src/main/java/llc/redstone/hysentials/util/C.java

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,60 @@ public class C {
3131
private C() {
3232
}
3333

34+
public static String toRedstoneHex(String color, boolean includeSymbol) {
35+
String hex;
36+
switch (color) {
37+
case "§0":
38+
hex = "000000";
39+
break;
40+
case "§1":
41+
hex = "0000AA";
42+
break;
43+
case "§2":
44+
hex = "00AA00";
45+
break;
46+
case "§3":
47+
hex = "00AAAA";
48+
break;
49+
case "§4":
50+
hex = "AA0000";
51+
break;
52+
case "§5":
53+
hex = "AA00AA";
54+
break;
55+
case "§6":
56+
hex = "E4B108";
57+
break;
58+
case "§7":
59+
hex = "7D838E";
60+
break;
61+
case "§8":
62+
hex = "555555";
63+
break;
64+
case "§9":
65+
hex = "5555FF";
66+
break;
67+
case "§a":
68+
hex = "80C415";
69+
break;
70+
case "§b":
71+
hex = "0FA2E5";
72+
break;
73+
case "§c":
74+
hex = "EA323C";
75+
break;
76+
case "§d":
77+
hex = "FF55FF";
78+
break;
79+
case "§e":
80+
hex = "FFFF55";
81+
break;
82+
default:
83+
hex = "FFFFFF";
84+
}
85+
return includeSymbol ? "#" + hex : hex;
86+
}
87+
3488
public static String toHex(String color, boolean includeSymbol) {
3589
String hex;
3690
switch (color) {

0 commit comments

Comments
 (0)