Skip to content

Commit d6c2210

Browse files
committed
Backport to 1.20-1.20.4
1 parent f6ef8a1 commit d6c2210

File tree

13 files changed

+28
-35
lines changed

13 files changed

+28
-35
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v4
1111

12-
- name: Set up JDK 21
12+
- name: Set up JDK 17
1313
uses: actions/setup-java@v4
1414
with:
1515
distribution: 'temurin'
16-
java-version: 21
16+
java-version: 17
1717

1818
- name: Cache
1919
uses: actions/cache@v4

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ subprojects {
1717
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
1818
mappings loom.layered {
1919
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
20-
mappings "dev.architectury:yarn-mappings-patch-neoforge:${project.yarn_patch}"
2120
}
2221
}
2322
}
@@ -32,7 +31,7 @@ allprojects {
3231

3332
tasks.withType(JavaCompile).configureEach {
3433
options.encoding = "UTF-8"
35-
options.release = 21
34+
options.release = 17
3635
}
3736

3837
java {

common/src/main/java/com/wulian/texturelocaleredirector/mixin/IdentifierAccessor.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

common/src/main/java/com/wulian/texturelocaleredirector/mixin/NamespaceResourceManagerMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private void onFindResources(String startingPath, Predicate<Identifier> allowedP
4444
}
4545

4646
String langSpecificPath = texturePrefix + currentLang + '/' + originalId.getPath().substring(prefixLength);
47-
Identifier langId = IdentifierAccessor.create(originalId.getNamespace(), langSpecificPath);
47+
Identifier langId = new Identifier(originalId.getNamespace(), langSpecificPath);
4848

4949
Boolean cache = LangTextureCache.get(langId);
5050
if (cache != null) {

common/src/main/resources/texturelocaleredirector.mixins.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"required": true,
33
"package": "com.wulian.texturelocaleredirector.mixin",
4-
"compatibilityLevel": "JAVA_21",
4+
"compatibilityLevel": "JAVA_17",
55
"minVersion": "0.8",
66
"injectors": {
77
"defaultRequire": 1
88
},
99
"client": [
10-
"IdentifierAccessor",
1110
"LanguageManagerMixin",
1211
"NamespaceResourceManagerMixin",
1312
"ReloadableResourceManagerImplMixin"

fabric/src/main/resources/fabric.mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
],
2525
"depends": {
2626
"fabric": "*",
27-
"minecraft": ">=1.20.5"
27+
"minecraft": ">=1.20 <1.20.5"
2828
}
2929
}

forge/src/main/resources/META-INF/mods.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
modLoader = "javafml"
2-
loaderVersion = "[49,)"
2+
loaderVersion = "[38,)"
33
issueTrackerURL = "https://github.com/Wulian233/TextureLocaleRedirector/issues"
44
license = "MIT"
55

@@ -20,6 +20,6 @@ config = "texturelocaleredirector.mixins.json"
2020
[[dependencies.texturelocaleredirector]]
2121
modId = "minecraft"
2222
mandatory = true
23-
versionRange = "[1.20.5,)"
23+
versionRange = "[1.20,1.20.5)"
2424
ordering = "NONE"
2525
side = "BOTH"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"pack": {
33
"description": "Texture-Locale-Redirector",
4-
"pack_format": 34
4+
"pack_format": 22
55
}
66
}

gradle.properties

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
org.gradle.jvmargs=-Xmx4g
22

3-
minecraft_version=1.21.1
3+
minecraft_version=1.20.4
44
enabled_platforms=fabric,forge,neoforge
55

6-
yarn_mappings=1.21.1+build.3
7-
yarn_patch=1.21+build.4
6+
yarn_mappings=1.20.4+build.3
87

98
archives_base_name=Texture-Locale-Redirector
109
mod_version=1.0.0
1110
maven_group=com.wulian.texturelocaleredirector
1211

13-
forge_version=52.1.3
14-
neoforge_version=21.1.197
12+
forge_version=49.2.0
13+
neoforge_version=20.4.247
1514

1615
fabric_loader_version=0.17.2
17-
fabric_api_version=0.116.5+1.21.1
16+
fabric_api_version=0.97.3+1.20.4

neoforge/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
processResources {
3434
inputs.property "version", project.version
3535

36-
filesMatching("META-INF/neoforge.mods.toml") {
36+
filesMatching("META-INF/mods.toml") {
3737
expand "version": project.version
3838
}
3939
}

0 commit comments

Comments
 (0)