Skip to content

Commit b7ae5e6

Browse files
authored
Merge pull request #32 from cxntered/port/1.21.11
port to 1.21.11
2 parents 0afa905 + b645076 commit b7ae5e6

10 files changed

Lines changed: 57 additions & 30 deletions

File tree

build.gradle.kts

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ plugins {
55
id("net.fabricmc.fabric-loom-remap") version "1.14-SNAPSHOT"
66
id("org.jetbrains.kotlin.jvm") version "2.3.0"
77
id("dev.deftu.gradle.bloom") version "0.2.0"
8+
id("me.modmuss50.mod-publish-plugin") version "1.1.0"
89
}
910

1011
val modid = property("mod.id")
1112
val modname = property("mod.name")
1213
val modversion = property("mod.version")
13-
val mcversion = property("minecraft_version")
14+
val mcversion = stonecutter.current.version
15+
val oneconfigversion = property("oneconfig_version")
1416

15-
base {
16-
archivesName.set(property("mod.id") as String)
17-
}
17+
version = "$modversion+$mcversion"
18+
base.archivesName = modname.toString()
1819

1920
repositories {
2021
maven("https://maven.parchmentmc.org")
@@ -33,27 +34,22 @@ loom {
3334
}
3435

3536
dependencies {
36-
minecraft("com.mojang:minecraft:${property("minecraft_version")}")
37+
minecraft("com.mojang:minecraft:$mcversion")
3738
@Suppress("UnstableApiUsage")
3839
mappings(loom.layered {
3940
officialMojangMappings()
4041
optionalProp("${property("parchment_version")}") {
41-
parchment("org.parchmentmc.data:parchment-${property("minecraft_version")}:$it@zip")
42+
parchment("org.parchmentmc.data:parchment-$mcversion:$it@zip")
4243
}
4344
optionalProp("${property("yalmm_version")}") {
44-
mappings("dev.lambdaurora:yalmm-mojbackward:${property("minecraft_version")}+build.$it")
45+
mappings("dev.lambdaurora:yalmm-mojbackward:$mcversion+build.$it")
4546
}
4647
})
4748
modImplementation("net.fabricmc:fabric-loader:${property("loader_version")}")
48-
modImplementation("org.polyfrost.oneconfig:${property("minecraft_version")}-fabric:1.0.0-alpha.181")
49-
modImplementation("org.polyfrost.oneconfig:commands:1.0.0-alpha.181")
50-
modImplementation("org.polyfrost.oneconfig:config:1.0.0-alpha.181")
51-
modImplementation("org.polyfrost.oneconfig:config-impl:1.0.0-alpha.181")
52-
modImplementation("org.polyfrost.oneconfig:events:1.0.0-alpha.181")
53-
modImplementation("org.polyfrost.oneconfig:internal:1.0.0-alpha.181")
54-
modImplementation("org.polyfrost.oneconfig:ui:1.0.0-alpha.181")
55-
modImplementation("org.polyfrost.oneconfig:utils:1.0.0-alpha.181")
56-
modImplementation("org.polyfrost.oneconfig:hud:1.0.0-alpha.181")
49+
modImplementation("org.polyfrost.oneconfig:$mcversion-fabric:$oneconfigversion")
50+
for (module in arrayOf("config", "config-impl", "internal", "ui")) {
51+
implementation("org.polyfrost.oneconfig:$module:$oneconfigversion")
52+
}
5753
}
5854

5955
bloom {
@@ -101,4 +97,31 @@ tasks.jar {
10197
}
10298

10399
fun <T> optionalProp(property: String, block: (String) -> T?): T? =
104-
findProperty(property)?.toString()?.takeUnless { it.isBlank() }?.let(block)
100+
findProperty(property)?.toString()?.takeUnless { it.isBlank() }?.let(block)
101+
102+
val modrinthId = findProperty("publish.modrinth")?.toString()?.takeIf { it.isNotBlank() }
103+
104+
// make sure modrinth.token is set in your user gradle properties
105+
publishMods {
106+
file = project.tasks.remapJar.get().archiveFile
107+
108+
displayName = modversion.toString()
109+
version = "v$modversion"
110+
changelog = project.rootProject.file("CHANGELOG.md").takeIf { it.exists() }?.readText() ?: "No changelog provided."
111+
type = ALPHA
112+
113+
modLoaders.add("fabric")
114+
115+
dryRun = modrinthId == null
116+
117+
if (modrinthId != null) {
118+
modrinth {
119+
projectId = property("publish.modrinth").toString()
120+
accessToken = findProperty("modrinth.token").toString()
121+
122+
minecraftVersions.add(mcversion)
123+
124+
requires("oneconfig")
125+
}
126+
}
127+
}

gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ mod.group=org.polyfrost
55

66
loom_version=1.14-SNAPSHOT
77
loader_version=0.18.4
8-
minecraft_version=[VERSIONED]
8+
oneconfig_version=1.0.0-alpha.182
99
parchment_version=[VERSIONED]
1010
yalmm_version=[VERSIONED]
1111

12+
publish.modrinth=Gapz72zt
13+
1214
org.gradle.daemon=true
1315
org.gradle.parallel=true
1416
org.gradle.configureoncommand=true

settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ plugins {
2020

2121
stonecutter {
2222
create(rootProject) {
23-
versions("1.21.1", "1.21.4", "1.21.8", "1.21.10")
23+
versions("1.21.1", "1.21.4", "1.21.8", "1.21.10", "1.21.11")
2424

25-
vcsVersion = "1.21.10"
25+
vcsVersion = "1.21.11"
2626
}
2727
}
2828

src/main/java/org/polyfrost/redaction/mixin/client/Mixin_LastJoinedServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private int modifyMultiplayerWidth(int i, @Local Component multiplayerDisabledRe
3838
return i;
3939
}
4040

41-
@Inject(method = "createNormalMenuOptions", at = @At(value = "RETURN"))
41+
@Inject(method = "createNormalMenuOptions", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/TitleScreen;addRenderableWidget(Lnet/minecraft/client/gui/components/events/GuiEventListener;)Lnet/minecraft/client/gui/components/events/GuiEventListener;", ordinal = 1, shift = At.Shift.AFTER))
4242
private void addLastServerButton(int i, int j, /*? if >=1.21.4 {*/ CallbackInfoReturnable<Integer> cir /*?} else {*/ /*CallbackInfo ci *//*?}*/, @Local Component multiplayerDisabledReason) {
4343
if (multiplayerDisabledReason != null) return;
4444

stonecutter.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ plugins {
22
id("dev.kikugie.stonecutter")
33
}
44

5-
stonecutter active "1.21.10" /* [SC] DO NOT EDIT */
5+
stonecutter active "1.21.11" /* [SC] DO NOT EDIT */
6+
7+
stonecutter tasks {
8+
order("publishModrinth")
9+
}

versions/1.21.1/gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
parchment_version=2024.11.17
2-
yalmm_version=3
3-
minecraft_version=1.21.1
2+
yalmm_version=3

versions/1.21.10/gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
parchment_version=2025.10.12
2-
yalmm_version=3
3-
minecraft_version=1.21.10
2+
yalmm_version=3

versions/1.21.11/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
parchment_version=2025.12.20
2+
yalmm_version=3

versions/1.21.4/gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
parchment_version=2025.03.23
2-
yalmm_version=3
3-
minecraft_version=1.21.4
2+
yalmm_version=3

versions/1.21.8/gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
parchment_version=2025.09.14
2-
yalmm_version=3
3-
minecraft_version=1.21.8
2+
yalmm_version=3

0 commit comments

Comments
 (0)