Skip to content

Commit

Permalink
remove forge fix command, since arch loom finally fixed it
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Sep 15, 2024
1 parent a7515d0 commit ba554ee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 60 deletions.
59 changes: 0 additions & 59 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,65 +56,6 @@ subprojects {
}
}

tasks.register('fixForge', Zip) {
if (gradle.startParameter.taskNames.contains(name)) {
if (!file('./build/libs/' + archives_base_name +
'-' + minecraft_version +
'-' + mod_version +
'-forge_nonfunctional_without_changes.jar').exists() ||
!file('./build/libs/' + archives_base_name +
'-' + minecraft_version +
'-' + mod_version +
'-neoforge.jar').exists()) {
throw new GradleException("forge and neoforge need to be built to run this task")
}
doFirst {
println('unzipping jars')
}
copy {
// extract all forge files
from zipTree('./build/libs/' + archives_base_name +
'-' + minecraft_version +
'-' + mod_version +
'-forge_nonfunctional_without_changes.jar')
into './build/tmp/forge'
// remove any refmap
exclude "**/*-refmap.json"
// remove the refmap from the mixin jsons
eachFile { fileCopyDetails ->
if (fileCopyDetails.name.endsWith('.json')) {
filter {
line -> line.contains('"refmap": "vivecraft-common-refmap.json"') ? '"dummy": ""' : line
}
}
}
}
copy {
// override the general classes with the neoforge ones, since those are mapped correctly
from zipTree('./build/libs/' + archives_base_name +
'-' + minecraft_version +
'-' + mod_version +
'-neoforge.jar')
into './build/tmp/forge'
include '/org/vivecraft/**'
exclude '**/neoforge/**', '**/Xplat*.class', '**/Xevents*.class'
}

// zip up the combined jar again
archiveFileName = archives_base_name +
'-' + minecraft_version +
'-' + mod_version +
'-forge.jar'
destinationDirectory = file('./build/libs/')
from './build/tmp/forge'

doLast {
println('removing temp files')
delete './build/tmp/forge'
}
}
}

allprojects {
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
Expand Down
2 changes: 1 addition & 1 deletion forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ shadowJar {
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
archiveClassifier.set('forge_nonfunctional_without_changes')
archiveClassifier.set('forge')
}

jar {
Expand Down

0 comments on commit ba554ee

Please sign in to comment.