Skip to content

Commit 1676093

Browse files
committed
[Port] Update to 26.1 (v2.7.0)
1 parent 71e593a commit 1676093

File tree

11 files changed

+22
-133
lines changed

11 files changed

+22
-133
lines changed

build.gradle.kts

Lines changed: 4 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import java.util.*
99

1010
plugins {
1111
java
12-
id("xyz.wagyourtail.unimined") version "1.3.14+neofix" apply false
12+
id("xyz.wagyourtail.unimined") version "1.3.14+neofix.1" apply false
1313
id("xyz.wagyourtail.jvmdowngrader") version "1.2.2"
1414
id("com.diffplug.gradle.spotless") version "8.0.0" apply false
1515
id("com.gradleup.shadow") version "9.2.2" apply false
@@ -170,119 +170,8 @@ subprojects {
170170
version(mcVersion)
171171

172172
mappings {
173-
val mcMappings = "mc_mappings"()!!
174-
when (mcMappingsType) {
175-
"mcp" -> {
176-
if (!isJarMod) {
177-
searge()
178-
}
179-
mcp(if (isJarMod) "legacy" else "stable", mcMappings) {
180-
if (!isJarMod) {
181-
clearOutputs()
182-
outputs("mcp", true) { listOf("intermediary") }
183-
}
184-
}
185-
}
186-
187-
"forgeMCP" -> {
188-
forgeBuiltinMCP("forge_version"()!!) {
189-
clearContains()
190-
clearOutputs()
191-
contains({ _, t ->
192-
!t.contains("MCP")
193-
}) {
194-
onlyExistingSrc()
195-
outputs("searge", false) { listOf("official") }
196-
}
197-
contains({ _, t ->
198-
t.contains("MCP")
199-
}) {
200-
outputs("mcp", true) { listOf("intermediary") }
201-
sourceNamespace("searge")
202-
}
203-
}
204-
officialMappingsFromJar {
205-
clearContains()
206-
clearOutputs()
207-
outputs("official", false) { listOf() }
208-
}
209-
}
210-
211-
"retroMCP" -> {
212-
retroMCP(mcMappings)
213-
}
214-
215-
"yarn" -> {
216-
yarn(mcMappings)
217-
}
218-
219-
"mojmap" -> {
220-
mojmap {
221-
skipIfNotIn("intermediary")
222-
}
223-
}
224-
225-
"parchment" -> {
226-
mojmap {
227-
skipIfNotIn("intermediary")
228-
}
229-
parchment(mcVersion, mcMappings)
230-
}
231-
232-
else -> throw GradleException("Unknown or Unsupported Mappings version")
233-
}
234-
235-
// Only use Intermediaries on Versions that support it
236-
val usingIntermediary = (isLegacy && protocol >= 39) || !isLegacy
237-
if (usingIntermediary) {
238-
if (isModern) {
239-
intermediary()
240-
} else {
241-
legacyIntermediary()
242-
}
243-
}
244-
245-
// ability to add custom mappings
246-
val target = if (!isModern) "mcp" else "mojmap"
247-
stub.withMappings("searge", target) {
248-
c("ModLoader", "net/minecraft/src/ModLoader", "net/minecraft/src/ModLoader")
249-
c("BaseMod", "net/minecraft/src/BaseMod", "net/minecraft/src/BaseMod")
250-
// Fix: Fixed an inconsistent mapping in 1.16 and 1.16.1 between MCP and Mojmap
251-
if (!isLegacy && (protocol == 735 || protocol == 736)) {
252-
c(
253-
"dng",
254-
listOf(
255-
"net/minecraft/client/gui/widget/Widget",
256-
"net/minecraft/client/gui/components/AbstractWidget"
257-
)
258-
) {
259-
m("e", "()I", "func_238483_d_", "getHeightRealms")
260-
}
261-
}
262-
}
263-
264-
if (isMCPJar) {
265-
if (protocol <= 2) { // MC a1.1.2_01 and below
266-
devNamespace("searge")
267-
} else {
268-
devFallbackNamespace("searge")
269-
}
270-
} else if (usingIntermediary) {
271-
devFallbackNamespace("official")
272-
}
273-
274-
if (shouldDowngrade) {
275-
val apiVersion = if (buildVersion.isJava7) JavaVersion.VERSION_1_8 else buildVersion
276-
val downgradeClient = tasks.register("downgradeClient", DowngradeFiles::class.java) {
277-
inputCollection = sourceSet.output.classesDirs + sourceSet.runtimeClasspath
278-
classpath = project.files()
279-
outputCollection.files
280-
}
281-
282-
runs.config("client") {
283-
classpath = downgradeClient.get().outputCollection + files(jvmdg.getDowngradedApi(apiVersion))
284-
}
285-
}
173+
devNamespace("official")
174+
devFallbackNamespace("official")
286175
}
287176

288177
minecraftRemapper.config {
@@ -305,7 +194,7 @@ subprojects {
305194
"compileOnly"("com.github.spotbugs:spotbugs-annotations:4.9.6")
306195

307196
// Attach UniLib dependency
308-
"modImplementation"(
197+
"implementation"(
309198
"com.gitlab.cdagaming.unilib:$libPrefix-${
310199
libName.replaceFirstChar {
311200
if (it.isLowerCase()) it.titlecase(

buildSrc/build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ repositories {
88
}
99

1010
dependencies {
11-
implementation("org.ow2.asm:asm:9.8")
12-
implementation("org.ow2.asm:asm-commons:9.8")
13-
implementation("org.ow2.asm:asm-tree:9.8")
14-
implementation("org.ow2.asm:asm-util:9.8")
15-
implementation("org.ow2.asm:asm-analysis:9.8")
11+
implementation("org.ow2.asm:asm:9.9.1")
12+
implementation("org.ow2.asm:asm-commons:9.9.1")
13+
implementation("org.ow2.asm:asm-tree:9.9.1")
14+
implementation("org.ow2.asm:asm-util:9.9.1")
15+
implementation("org.ow2.asm:asm-analysis:9.9.1")
1616

1717
implementation("org.apache.commons:commons-compress:1.27.1")
1818
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
accessWidener v2 named
1+
accessWidener v2 official
22

33
accessible field net/minecraft/client/multiplayer/ClientCommonPacketListenerImpl postDisconnectScreen Lnet/minecraft/client/gui/screens/Screen;
44
accessible method com/mojang/realmsclient/RealmsMainScreen getSelectedServer ()Lcom/mojang/realmsclient/dto/RealmsServer;

fabric/src/main/resources/pack.mcmeta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"pack": {
33
"description": "${mod_name} Resources",
44
"min_format": [65, 0],
5-
"max_format": [75, 0]
5+
"max_format": [76, 0]
66
}
77
}

forge/src/main/resources/pack.mcmeta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"pack": {
33
"description": "${mod_name} Resources",
44
"min_format": [65, 0],
5-
"max_format": [75, 0]
5+
"max_format": [76, 0]
66
}
77
}

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ isJarMod=false
1313
# Mapping Info
1414
mc_mappings=
1515
mc_mappings_type=mojmap
16-
mc_version=1.21.11
17-
mc_protocol=774
16+
mc_version=26.1-snapshot-1
17+
mc_protocol=775
1818
display_version=
1919
# Fabric Info
2020
fabric_api_version=0.139.4+1.21.11
@@ -37,8 +37,8 @@ deploymentType=Alpha
3737
versionLabel=Release
3838
additional_mc_versions=
3939
# Integration Info
40-
source_java_version=21
41-
build_java_version=21
40+
source_java_version=25
41+
build_java_version=25
4242
fabric_loader_version=0.18.2
4343
ipc_version=0.10.6
4444
reflect_version=1.5.0

gradle/wrapper/gradle-wrapper.jar

59 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ case "$( uname )" in #(
114114
NONSTOP* ) nonstop=true ;;
115115
esac
116116

117-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
118118

119119

120120
# Determine the Java command to use to start the JVM.
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
213213
set -- \
214214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
215215
-classpath "$CLASSPATH" \
216-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
217217
"$@"
218218

219219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7474

7575

7676
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7878

7979
:end
8080
@rem End local scope for the variables with windows NT shell

0 commit comments

Comments
 (0)