From 8ed87c23ceb6e02cebe7fd1927f097da0dc70986 Mon Sep 17 00:00:00 2001 From: Wulian Date: Sat, 26 Oct 2024 14:20:41 +0800 Subject: [PATCH] 1.2 update --- .github/workflows/build.yml | 11 ----------- build.gradle | 18 ------------------ fabric/build.gradle | 8 +------- .../fabric/ModMenuCompat.java | 18 ------------------ .../fabric/mixin/ChatHudMixin.java | 4 ++-- fabric/src/main/resources/fabric.mod.json | 4 ---- gradle.properties | 4 +--- .../neoforge/mixin/ChatHudMixin.java | 4 ++-- .../main/resources/META-INF/neoforge.mods.toml | 9 +-------- neoforge/src/main/resources/pack.mcmeta | 3 ++- 10 files changed, 9 insertions(+), 74 deletions(-) delete mode 100644 fabric/src/main/java/com/wulian/chatimpressiveanimation/fabric/ModMenuCompat.java diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b97a5a..18a0c2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,11 +27,6 @@ jobs: chmod +x gradlew ./gradlew build - - name: Merge Fabric & NeoForge JARs - run: | - chmod +x gradlew - ./gradlew fusejars - - name: Upload fabric artifacts uses: actions/upload-artifact@v4 with: @@ -43,9 +38,3 @@ jobs: with: name: neoforge-artifacts path: ${{ github.workspace }}/neoforge/build/libs - - - name: Upload merged artifacts - uses: actions/upload-artifact@v4 - with: - name: merged-artifacts - path: ${{ github.workspace }}/build/merged/* diff --git a/build.gradle b/build.gradle index 8bba213..61eff7d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,6 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false - id "com.hypherionmc.modutils.modfusioner" version "1.0.+" id "com.github.johnrengelman.shadow" version "8.+" apply false } @@ -42,21 +41,4 @@ allprojects { java { withSourcesJar() } - - fusioner { - packageGroup = rootProject.maven_group - mergedJarName = "${rootProject.archives_base_name}" - outputDirectory = "build/merged" - jarVersion = rootProject.version - - neoforge { - projectName = "neoforge" - inputTaskName = "remapJar" - } - - fabric { - projectName = "fabric" - inputTaskName = "remapJar" - } - } } diff --git a/fabric/build.gradle b/fabric/build.gradle index ae7299f..f7e001b 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -20,22 +20,16 @@ configurations { } repositories { - maven { url "https://maven.terraformersmc.com/releases/" } - maven { url "https://maven.nucleoid.xyz/" } } dependencies { modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}" - // Remove the next line if you don't want to depend on the API modApi "dev.architectury:architectury-fabric:${rootProject.architectury_version}" + modApi "me.shedaniel.cloth:cloth-config-fabric:${rootProject.clothconfig_version}" common(project(path: ":common", configuration: "namedElements")) { transitive false } shadowBundle(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } - - modApi "me.shedaniel.cloth:cloth-config-fabric:${rootProject.clothconfig_version}" - modApi "com.terraformersmc:modmenu:${rootProject.modmenu_version}" - modApi "eu.pb4:placeholder-api:${rootProject.placeholder_api_version}" } processResources { diff --git a/fabric/src/main/java/com/wulian/chatimpressiveanimation/fabric/ModMenuCompat.java b/fabric/src/main/java/com/wulian/chatimpressiveanimation/fabric/ModMenuCompat.java deleted file mode 100644 index 370777b..0000000 --- a/fabric/src/main/java/com/wulian/chatimpressiveanimation/fabric/ModMenuCompat.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.wulian.chatimpressiveanimation.fabric; - -import com.terraformersmc.modmenu.api.ConfigScreenFactory; -import com.terraformersmc.modmenu.api.ModMenuApi; -import com.wulian.chatimpressiveanimation.config.ModConfigs; -import me.shedaniel.autoconfig.AutoConfig; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; - -@Environment(EnvType.CLIENT) -class ModMenuCompat implements ModMenuApi { - @Override - public ConfigScreenFactory getModConfigScreenFactory() { - return parent -> AutoConfig.getConfigScreen(ModConfigs.class, parent).get(); - } -} - - diff --git a/fabric/src/main/java/com/wulian/chatimpressiveanimation/fabric/mixin/ChatHudMixin.java b/fabric/src/main/java/com/wulian/chatimpressiveanimation/fabric/mixin/ChatHudMixin.java index 444974e..226febe 100644 --- a/fabric/src/main/java/com/wulian/chatimpressiveanimation/fabric/mixin/ChatHudMixin.java +++ b/fabric/src/main/java/com/wulian/chatimpressiveanimation/fabric/mixin/ChatHudMixin.java @@ -80,8 +80,8 @@ private float applyYOffset(float y) { return y + chatDisplacementY; } - @Inject(method = "addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;ILnet/minecraft/client/gui/hud/MessageIndicator;Z)V", at = @At("TAIL")) - private void addMessage(Text message, MessageSignatureData signature, int ticks, MessageIndicator indicator, boolean refresh, CallbackInfo ci) { + @Inject(method = "addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;Lnet/minecraft/client/gui/hud/MessageIndicator;)V", at = @At("TAIL")) + private void addMessage(Text message, MessageSignatureData signatureData, MessageIndicator indicator, CallbackInfo ci) { messageTimestamps.addFirst(System.currentTimeMillis()); while (this.messageTimestamps.size() > this.visibleMessages.size()) { this.messageTimestamps.removeLast(); diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index f752c9f..54084f3 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -18,9 +18,6 @@ "entrypoints": { "client": [ "com.wulian.chatimpressiveanimation.fabric.ChatImpressiveAnimationClientFabric" - ], - "modmenu": [ - "com.wulian.chatimpressiveanimation.fabric.ModMenuCompat" ] }, "mixins": [ @@ -30,7 +27,6 @@ "depends": { "fabricloader": ">=0.15.0", "minecraft": ">=1.20.5", - "architectury": "*", "cloth-config": "*" } } diff --git a/gradle.properties b/gradle.properties index e0825eb..fcae414 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,12 +6,10 @@ yarn_mappings=1.20.6+build.3 yarn_patch=1.20.5+build.3 archives_base_name=ChatImpressiveAnimation -mod_version=1.1.0 +mod_version=1.2.0 maven_group=com.wulian.chatimpressiveanimation architectury_version=12.1.4 -modmenu_version=10.0.0 -placeholder_api_version=2.4.0-pre.1+1.20.5 clothconfig_version=14.0.139 fabric_loader_version=0.16.7 diff --git a/neoforge/src/main/java/com/wulian/chatimpressiveanimation/neoforge/mixin/ChatHudMixin.java b/neoforge/src/main/java/com/wulian/chatimpressiveanimation/neoforge/mixin/ChatHudMixin.java index 908672e..0d29219 100644 --- a/neoforge/src/main/java/com/wulian/chatimpressiveanimation/neoforge/mixin/ChatHudMixin.java +++ b/neoforge/src/main/java/com/wulian/chatimpressiveanimation/neoforge/mixin/ChatHudMixin.java @@ -80,8 +80,8 @@ private float applyYOffset(float y) { return y + chatDisplacementY; } - @Inject(method = "addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;ILnet/minecraft/client/gui/hud/MessageIndicator;Z)V", at = @At("TAIL")) - private void addMessage(Text message, MessageSignatureData signature, int ticks, MessageIndicator indicator, boolean refresh, CallbackInfo ci) { + @Inject(method = "addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;Lnet/minecraft/client/gui/hud/MessageIndicator;)V", at = @At("TAIL")) + private void addMessage(Text message, MessageSignatureData signatureData, MessageIndicator indicator, CallbackInfo ci) { messageTimestamps.addFirst(System.currentTimeMillis()); while (this.messageTimestamps.size() > this.visibleMessages.size()) { this.messageTimestamps.removeLast(); diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml index 69861eb..d9ca190 100644 --- a/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -30,17 +30,10 @@ side = "BOTH" [[dependencies.chatimpressiveanimation]] modId = "minecraft" type = "required" -versionRange = "[1.20.5,1.21)" +versionRange = "[1.20.5,)" ordering = "NONE" side = "BOTH" -[[dependencies.chatimpressiveanimation]] -modId = "architectury" -type = "required" -versionRange = "*" -ordering = "AFTER" -side = "BOTH" - [[dependencies.chatimpressiveanimation]] modId = "cloth_config" type = "required" diff --git a/neoforge/src/main/resources/pack.mcmeta b/neoforge/src/main/resources/pack.mcmeta index 2b22488..d8c242b 100644 --- a/neoforge/src/main/resources/pack.mcmeta +++ b/neoforge/src/main/resources/pack.mcmeta @@ -1,6 +1,7 @@ { "pack": { "description": "Chat Impressive Animation", - "pack_format": 32 + "pack_format": 32, + "supported_formats": [24, 32] } }