Skip to content

Commit

Permalink
Port to 1.21.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Wulian233 authored Oct 26, 2024
1 parent 3517de7 commit 1d2e2b4
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 75 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ This mod makes the chat look better by adding animations. Such as opening chat,

Using this mod is very simple!

First of all, you need to install Architectury API and Cloth Config API, and then you can install this module and use it!
First of all, you need to install Cloth Config API, and then you can install this mod and use it!

## 👀 License

Expand Down
2 changes: 1 addition & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

使用这个模组非常简单!

首先需要安装前置模组Architectury API和Cloth Config API,然后即可安装本模组使用啦!
首先需要安装前置模组Cloth Config API,然后即可安装本模组使用啦!

## 👀 协议

Expand Down
18 changes: 0 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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
}

Expand Down Expand Up @@ -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"
}
}
}
8 changes: 1 addition & 7 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 1 addition & 4 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
"environment": "client",
"entrypoints": {
"client": [
"com.wulian.chatimpressiveanimation.fabric.ChatImpressiveAnimationClientFabric"
],
"modmenu": [
"com.wulian.chatimpressiveanimation.fabric.ModMenuCompat"
"com.wulian.chatimpressiveanimation.fabric.ChatImpressiveAnimationClientFabric"
]
},
"mixins": [
Expand Down
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ yarn_mappings=1.21.1+build.3
yarn_patch=1.21+build.4

archives_base_name=ChatImpressiveAnimation
mod_version=1.1.0
mod_version=1.2.0
maven_group=com.wulian.chatimpressiveanimation

architectury_version=13.0.6
modmenu_version=11.0.2
placeholder_api_version=2.4.1+1.21
clothconfig_version=15.0.140

fabric_loader_version=0.16.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 0 additions & 7 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ versionRange = "[1.21,1.22)"
ordering = "NONE"
side = "BOTH"

[[dependencies.chatimpressiveanimation]]
modId = "architectury"
type = "required"
versionRange = "*"
ordering = "AFTER"
side = "BOTH"

[[dependencies.chatimpressiveanimation]]
modId = "cloth_config"
type = "required"
Expand Down
3 changes: 2 additions & 1 deletion neoforge/src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"pack": {
"description": "Chat Impressive Animation",
"pack_format": 32
"pack_format": 33,
"supported_formats": [33, 99]
}
}

0 comments on commit 1d2e2b4

Please sign in to comment.