Skip to content

Commit d533e67

Browse files
committed
up 大改渲染
1 parent 7ebdffe commit d533e67

20 files changed

Lines changed: 203 additions & 105 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ allprojects {
1212
apply(plugin = "com.gradleup.shadow")
1313

1414
group = "com.coloryr"
15-
version = "3.9.2"
15+
version = "4.0.0"
1616

1717
// 设置项目JDK版本
1818
java.sourceCompatibility = JavaVersion.VERSION_1_8
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
object Versions {
22
const val fabricLoom = "1.16-SNAPSHOT"
33
const val architecturyLoom = "1.14-SNAPSHOT"
4+
const val httpclient5 = "5.6.1"
5+
const val httpcore5 = "5.4.2"
6+
const val httpcore5_h2 = "5.4.2"
7+
const val gson = "2.14.0"
8+
const val sqlite = "3.53.1.0"
9+
const val minimessage = "4.26.1"
10+
const val adventure = "4.8.1"
411
}

client

Submodule client updated 25 files
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
#Mon Jun 16 08:15:35 CST 2025
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
4+
networkTimeout=10000
5+
retries=0
6+
retryBackOffMs=500
7+
validateDistributionUrl=true
58
zipStoreBase=GRADLE_USER_HOME
69
zipStorePath=wrapper/dists

gradlew

Lines changed: 32 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 26 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ subprojects {
66
shadowImplementation(project(":server:core"))
77
shadowImplementation(project(":codec"))
88
shadowImplementation(project(":codec:buffercodec"))
9-
10-
shadowImplementation("org.xerial:sqlite-jdbc:3.51.1.0")
119
}
1210

1311
tasks {

server/core/build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
dependencies {
2-
shadowImplementation("org.apache.httpcomponents.client5:httpclient5:5.6")
3-
shadowImplementation("org.apache.httpcomponents.core5:httpcore5:5.4")
4-
shadowImplementation("org.apache.httpcomponents.core5:httpcore5-h2:5.4")
2+
shadowImplementation("org.apache.httpcomponents.client5:httpclient5:${Versions.httpclient5}")
3+
shadowImplementation("org.apache.httpcomponents.core5:httpcore5:${Versions.httpcore5}")
4+
shadowImplementation("org.apache.httpcomponents.core5:httpcore5-h2:${Versions.httpcore5_h2}")
55

6-
compileOnly("com.google.code.gson:gson:2.11.0")
7-
compileOnly("net.kyori:adventure-text-minimessage:4.26.1")
6+
compileOnly("com.google.code.gson:gson:${Versions.gson}")
7+
compileOnly("net.kyori:adventure-text-minimessage:${Versions.minimessage}")
88
}

server/core/src/main/java/com/coloryr/allmusic/server/core/AllMusic.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ public class AllMusic {
4747
/**
4848
* 插件版本号
4949
*/
50-
public static final String version = "3.9.0";
50+
public static final String version = "4.0.0";
5151
/**
5252
* 配置文件版本号
5353
*/
54-
public static final String configVersion = "207";
54+
public static final String configVersion = "400";
5555
/**
5656
* 语言文件配置版本号
5757
*/
58-
public static final String messageVersion = "212";
58+
public static final String messageVersion = "400";
5959
/**
6060
* 日志
6161
*/

server/core/src/main/java/com/coloryr/allmusic/server/core/command/sub/CommandHudSet.java

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class CommandHudSet extends AHudCommand {
2020
this.add("enable");
2121
this.add("pos");
2222
this.add("dir");
23+
this.add("alpha");
2324
this.add("reset");
2425
}};
2526
private static final List<String> pic = new ArrayList<String>() {{
@@ -42,6 +43,7 @@ public CommandHudSet(HudType type) {
4243
commandList.put("enable", new HudEnable(type));
4344
commandList.put("reset", new HudReset(type));
4445
commandList.put("pos", new HudPos(type));
46+
commandList.put("alpha", new HudAlpha(type));
4547
commandList.put("dir", new HudDir(type));
4648
if (type == HudType.PIC) {
4749
commandList.put("size", new PicSize());
@@ -148,8 +150,35 @@ public void execute(Object sender, String name, String[] args) {
148150

149151
AllMusic.side.sendMessageTask(sender, AllMusic.getMessage().hud.set
150152
.replace(ARG.hud, AllMusic.getMessage().hudList.getHud(type))
151-
.replace(ARG.x, args[3])
152-
.replace(ARG.y, args[4]));
153+
.replace(ARG.x, String.valueOf(obj.x))
154+
.replace(ARG.y, String.valueOf(obj.y)));
155+
} catch (Exception e) {
156+
AllMusic.side.sendMessage(sender, AllMusic.getMessage().command.error);
157+
}
158+
}
159+
}
160+
161+
private static class HudAlpha extends AHudCommand {
162+
public HudAlpha(HudType type) {
163+
super(type);
164+
}
165+
166+
@Override
167+
public void execute(Object sender, String name, String[] args) {
168+
try {
169+
if (args.length != 4) {
170+
AllMusic.side.sendMessage(sender, AllMusic.getMessage().command.error);
171+
return;
172+
}
173+
HudItemPosObj obj = HudUtils.setHudAlpha(name, type, args[3]);
174+
if (obj == null) {
175+
AllMusic.side.sendMessageTask(sender, AllMusic.getMessage().command.error);
176+
return;
177+
}
178+
179+
AllMusic.side.sendMessageTask(sender, AllMusic.getMessage().hud.set4
180+
.replace(ARG.hud, AllMusic.getMessage().hudList.getHud(type))
181+
.replace(ARG.alpha, String.valueOf(obj.alpha)));
153182
} catch (Exception e) {
154183
AllMusic.side.sendMessage(sender, AllMusic.getMessage().command.error);
155184
}

0 commit comments

Comments
 (0)