@@ -28,8 +28,10 @@ import io.papermc.paperweight.core.extension.PaperweightCoreExtension
2828import io.papermc.paperweight.core.taskcontainers.CoreTasks
2929import io.papermc.paperweight.core.taskcontainers.DevBundleTasks
3030import io.papermc.paperweight.core.taskcontainers.PaperclipTasks
31+ import io.papermc.paperweight.core.tasks.SetupForkUpstreamSources
3132import io.papermc.paperweight.core.tasks.patching.ApplyBasePatches
3233import io.papermc.paperweight.core.tasks.patching.ApplyFilePatches
34+ import io.papermc.paperweight.core.tasks.patching.RebuildFilePatches
3335import io.papermc.paperweight.core.tasks.patchroulette.PatchRouletteTasks
3436import io.papermc.paperweight.core.util.coreExt
3537import io.papermc.paperweight.core.util.createBuildTasks
@@ -51,6 +53,7 @@ import org.gradle.api.tasks.Delete
5153import org.gradle.api.tasks.SourceSet
5254import org.gradle.api.tasks.bundling.AbstractArchiveTask
5355import org.gradle.kotlin.dsl.*
56+ import org.gradle.kotlin.dsl.withType
5457
5558abstract class PaperweightCore : Plugin <Project > {
5659 @get:Inject
@@ -196,6 +199,17 @@ abstract class PaperweightCore : Plugin<Project> {
196199 mache.get().addRepositories(this )
197200 mache.get().addDependencies(this )
198201
202+ // attach the mache minecraft jar so JST can properly create binary representations
203+ target.tasks.withType<SetupForkUpstreamSources >().configureEach {
204+ dependsOn(target.tasks.named(" macheRemapJar" ))
205+ ats.jstClasspath.from(target.configurations.named(MACHE_MINECRAFT_CONFIG ))
206+ }
207+
208+ target.tasks.withType<RebuildFilePatches >().configureEach {
209+ dependsOn(target.tasks.named(" macheRemapJar" ))
210+ ats.jstClasspath.from(target.configurations.named(MACHE_MINECRAFT_CONFIG ))
211+ }
212+
199213 tasks.afterEvaluate()
200214
201215 devBundleTasks.configureAfterEvaluate(
0 commit comments