9
0
mirror of https://github.com/Xiao-MoMi/Custom-Nameplates.git synced 2025-12-30 12:19:12 +00:00

2.0-PRE-1

This commit is contained in:
Xiao-MoMi
2022-09-07 01:33:02 +08:00
parent dfcaa8de09
commit 1daa63f649
2 changed files with 2 additions and 20 deletions

View File

@@ -50,17 +50,9 @@ public enum FontNegative {
*/
public static String getShortestNegChars(int n) {
StringBuilder stringBuilder = new StringBuilder();
if (n > 128) {
while (n > 128) {
stringBuilder.append(FontNegative.NEG_128.getCharacter());
n -= 128;
if (n > 128) {
stringBuilder.append(FontNegative.NEG_128.getCharacter());
n -= 128;
if (n > 128) {
stringBuilder.append(FontNegative.NEG_128.getCharacter());
n -= 128;
}
}
}
if (n - 64 > 0) {
stringBuilder.append(FontNegative.NEG_64.getCharacter());

View File

@@ -33,20 +33,10 @@ public record BackGround(String key, String start, String offset_1,
StringBuilder stringBuilder = new StringBuilder();
HashMap<String, Character> chars = ResourceManager.BACKGROUNDS.get(key);
stringBuilder.append(chars.get(start));
if (n > 128) {
while (n > 128) {
stringBuilder.append(FontNegative.NEG_1.getCharacter());
stringBuilder.append(chars.get(offset_128));
n -= 128;
if (n > 128) {
stringBuilder.append(FontNegative.NEG_1.getCharacter());
stringBuilder.append(chars.get(offset_128));
n -= 128;
if (n > 128) {
stringBuilder.append(FontNegative.NEG_1.getCharacter());
stringBuilder.append(chars.get(offset_128));
n -= 128;
}
}
}
if (n - 64 > 0) {
stringBuilder.append(FontNegative.NEG_1.getCharacter());