Skip to content

Commit fdb14e6

Browse files
committed
chore: update purpur
1 parent cf9105a commit fdb14e6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

api/src/main/java/kr/toxicity/model/api/pack/PackObfuscator.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public interface PackObfuscator {
5959
/**
6060
* Obfuscate by order
6161
*/
62-
class Order implements PackObfuscator {
62+
final class Order implements PackObfuscator {
6363

6464
private static final char[] AVAILABLE_NAME = new char[] {
6565
'a', 'b', 'c', 'd', 'e', 'f', 'g',
@@ -68,6 +68,7 @@ class Order implements PackObfuscator {
6868
'w', 'x', 'y', 'z',
6969
'0', '1', '2', '3', '4', '5', '6' ,'7', '8', '9'
7070
};
71+
private static final int NAME_LENGTH = AVAILABLE_NAME.length;
7172

7273
private final Map<String, String> nameMap = new HashMap<>();
7374

@@ -81,11 +82,11 @@ private Order() {
8182
return nameMap.computeIfAbsent(rawName, n -> {
8283
var size = nameMap.size();
8384
var builder = new StringBuilder();
84-
while (size >= AVAILABLE_NAME.length) {
85-
builder.append(AVAILABLE_NAME[size % AVAILABLE_NAME.length]);
86-
size /= AVAILABLE_NAME.length;
85+
while (size >= NAME_LENGTH) {
86+
builder.append(AVAILABLE_NAME[size % NAME_LENGTH]);
87+
size /= NAME_LENGTH;
8788
}
88-
builder.append(AVAILABLE_NAME[size % AVAILABLE_NAME.length]);
89+
builder.append(AVAILABLE_NAME[size % NAME_LENGTH]);
8990
return builder.toString();
9091
});
9192
}

purpur/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ repositories {
77
}
88

99
dependencies {
10-
//compileOnly("org.purpurmc.purpur:purpur-api:${property("minecraft_version")}-R0.1-SNAPSHOT")
11-
compileOnly("org.purpurmc.purpur:purpur-api:1.21.9-R0.1-SNAPSHOT")
10+
compileOnly("org.purpurmc.purpur:purpur-api:${property("minecraft_version")}-R0.1-SNAPSHOT")
1211
}

0 commit comments

Comments
 (0)