Skip to content

Commit 047e5fe

Browse files
LexManosPaintNinja
andcommitted
26.1 Update
Minecraft is now Unobfuscated and requires Java 25 Lots of changes/code cleanup. See https://github.com/MinecraftForge/MinecraftForge-Experimental/tree/26.1-dev for non-squashed commits. Co-authored-by: Paint_Ninja <PaintNinja@users.noreply.github.com>
1 parent 5ac2675 commit 047e5fe

1,558 files changed

Lines changed: 11102 additions & 16276 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish
22

33
on:
44
push:
5-
branches: [ '1.21.11' ]
5+
branches: [ '26.1' ]
66

77
permissions:
88
contents: read

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ src/*/generated/**/.cache/
4646
/*/.gitignore
4747
/*/.factorypath
4848
/*/.apt_generated/
49+
/fmlcore/logs/

build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ plugins {
77
id 'net.minecraftforge.gradleutils' version '[2.6.4,2.7)'
88
id 'eclipse'
99
id 'de.undercouch.download' version '5.4.0'
10-
id 'net.minecraftforge.gradle.patcher' version '[6.0.46,6.2)' apply false
11-
id 'net.minecraftforge.gradle.mcp' version '[6.0.46,6.2)' apply false
10+
id 'net.minecraftforge.gradle.patcher' version '[6.0.51,6.2)' apply false
11+
id 'net.minecraftforge.gradle.mcp' version '[6.0.51,6.2)' apply false
1212
id 'net.minecraftforge.gradlejarsigner' version '1.0.4'
13-
id 'org.barfuin.gradle.taskinfo' version '2.1.0'
13+
id 'org.barfuin.gradle.taskinfo' version '3.0.1'
1414
}
1515

1616
Util.init() //Init all our extension methods!
@@ -41,6 +41,9 @@ project(':mcp') {
4141
config MC_VERSION + '-' + MCP_VERSION
4242
pipeline = 'joined'
4343
}
44+
repositories {
45+
mavenLocal()
46+
}
4447
}
4548

4649
if (System.env.TEAMCITY_VERSION) {

buildSrc/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ repositories {
44
}
55

66
dependencies {
7-
implementation 'org.ow2.asm:asm:9.8'
8-
implementation 'org.ow2.asm:asm-tree:9.8'
7+
implementation 'org.ow2.asm:asm:9.9.1'
8+
implementation 'org.ow2.asm:asm-tree:9.9.1'
99
implementation 'net.minecraftforge:srgutils:0.6.2'
1010
implementation 'net.minecraftforge:JarJarMetadata:0.3.27'
1111
implementation 'commons-io:commons-io:2.13.0'

buildSrc/src/main/groovy/net/minecraftforge/forge/tasks/BundleList.groovy

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ import java.util.zip.ZipFile
1010

1111
abstract class BundleList extends DefaultTask {
1212
@InputFiles abstract ConfigurableFileCollection getConfig()
13-
@InputFiles abstract ConfigurableFileCollection getConfigExtra()
1413
@InputFile abstract RegularFileProperty getServerBundle()
1514
@OutputFile abstract RegularFileProperty getOutput()
1615

1716
BundleList() {
1817
config.setFrom(project.configurations.installer)
19-
configExtra.setFrom(project.configurations.installerextra)
2018
output.convention(project.layout.buildDirectory.file("$name/output.list"))
2119
configure {
2220
dependsOn(project.tasks.universalJar)
@@ -36,13 +34,6 @@ abstract class BundleList extends DefaultTask {
3634
entries.put("$info.art.group:$info.art.name", "$dep.file.sha256\t$info.name\t$info.path")
3735
}
3836

39-
resolved = project.configurations.installerextra.resolvedConfiguration.resolvedArtifacts
40-
for (def dep : resolved) {
41-
def info = Util.getMavenInfoFromDep(dep)
42-
//println("$dep.file.sha1\t$info.name\t$info.path")
43-
entries.put("$info.art.group:$info.art.name", "$dep.file.sha256\t$info.name\t$info.path")
44-
}
45-
4637
var packed = (AbstractArchiveTask) project.tasks.universalJar
4738
var info = Util.getMavenInfoFromTask(packed)
4839
def file = packed.archiveFile.get().asFile

buildSrc/src/main/groovy/net/minecraftforge/forge/tasks/LauncherJson.groovy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ abstract class LauncherJson extends DefaultTask {
2424
dependsOn(project.tasks.universalJar)
2525
input.from(project.tasks.universalJar.archiveFile)
2626
input.from(project.configurations.installer)
27-
input.from(project.configurations.installerextra)
2827
configure {
2928
def mc = project.rootProject.ext.MC_VERSION
3029
def forge = project.rootProject.ext.FORGE_VERSION
@@ -89,7 +88,6 @@ abstract class LauncherJson extends DefaultTask {
8988
]
9089
])
9190

92-
json.libraries.addAll(getArtifacts(project.configurations.installerextra).values())
9391
json.libraries.addAll(getArtifacts(project.configurations.installer).values())
9492
Files.writeString(output.get().asFile.toPath(), new JsonBuilder(json).toPrettyString())
9593
}

buildSrc/src/main/groovy/net/minecraftforge/forge/tasks/checks/CheckATs.groovy

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,15 @@ abstract class CheckATs extends CheckTask {
1717

1818
@InputFile abstract RegularFileProperty getInheritance()
1919
@InputFiles abstract ConfigurableFileCollection getAts()
20-
@InputFile @Optional abstract RegularFileProperty getMappings()
2120

2221
@Override
2322
void check(Reporter reporter, boolean fix) {
24-
final IMappingFile mappings = mappings.map { RegularFile it -> IMappingFile.load(it.asFile) }.getOrNull()
2523
final inheritance = InheritanceData.parse(this.inheritance.get().asFile)
2624

2725
ats.each {
2826
final lines = process(it, reporter, inheritance)
2927
if (fix) {
30-
it.text = joinBack(lines, inheritance, mappings).join('\n')
28+
it.text = joinBack(lines, inheritance).join('\n')
3129
}
3230
}
3331
}
@@ -170,45 +168,18 @@ abstract class CheckATs extends CheckTask {
170168
return lines
171169
}
172170

173-
private static List<String> joinBack(TreeMap<String, ATParser.Entry> lines, Map<String, InheritanceData> inheritance, IMappingFile mappings) {
171+
private static List<String> joinBack(TreeMap<String, ATParser.Entry> lines, Map<String, InheritanceData> inheritance) {
174172
final data = [] as List<String>
175-
final remapComment = { ATParser.Entry entry ->
176-
if (!mappings || !entry || !entry.desc) return null
177-
final comment = entry.comment?.substring(1)?.trim()
178-
final jsonCls = inheritance.get(entry.cls.replaceAll('\\.', '/'))
179-
final mappingsClass = mappings?.getClass(jsonCls.name)
180-
if (mappingsClass === null) return entry.comment
181-
final idx = entry.desc.indexOf('(')
182-
183-
String mappedName = idx == -1
184-
? mappingsClass.remapField(entry.desc)
185-
: mappingsClass.remapMethod(entry.desc.substring(0, idx), entry.desc.substring(idx))
186-
if (!mappedName) return entry.comment
187-
if (mappedName == '<init>')
188-
mappedName = 'constructor'
189-
190-
if (comment?.startsWith(mappedName))
191-
return '# ' + comment
192-
if (comment && comment.indexOf(' ') !== -1) {
193-
def split = comment.split(' - ').toList()
194-
if (split[0].indexOf(' ') !== -1)
195-
// The first string is more than one word, so append before it
196-
return "# ${mappedName} - ${comment}"
197-
split.remove(0)
198-
return "# ${mappedName} - ${String.join(' - ', split)}"
199-
}
200-
return '# ' + mappedName
201-
}
202173
lines.each { key, value ->
203174
if (!value.group) {
204-
def comment = remapComment.call(value)
175+
def comment = null //value.comment
205176
data.add(value.modifier + ' ' + key + (comment ? ' ' + comment : ''))
206177
} else {
207178
data.add(('#group ' + value.modifier + ' ' + key + ' ' + (value.comment ?: '')).trim())
208179
value.children.each {
209180
final line = value.modifier + ' ' + it
210181
final entry = ATParser.parseEntry(line)
211-
final comment = remapComment(entry)
182+
final comment = null //entry.comment
212183
data.add(line + (comment ? ' ' + comment : ''))
213184
}
214185
data.add('#endgroup')

0 commit comments

Comments
 (0)