From c156df88a076433287d7cbc182a3943ca645dff3 Mon Sep 17 00:00:00 2001 From: Toffikk Date: Sun, 25 Jan 2026 17:29:58 +0100 Subject: [PATCH 1/7] feat: expose configuration to fail on invalid ATs, closes #344 --- .../paperweight/core/extension/PaperweightCoreExtension.kt | 2 ++ .../papermc/paperweight/core/taskcontainers/CoreTasks.kt | 1 + .../core/taskcontainers/MinecraftPatchingTasks.kt | 2 ++ .../paperweight/core/tasks/SetupForkMinecraftSources.kt | 4 ++++ .../paperweight/core/tasks/SetupMinecraftSources.kt | 4 ++++ .../paperweight/core/tasks/patching/RebuildFilePatches.kt | 1 + .../io/papermc/paperweight/core/util/ApplySourceATs.kt | 7 +++++-- 7 files changed, 19 insertions(+), 2 deletions(-) diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt index d386ee1e6..df3b973a0 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt @@ -79,4 +79,6 @@ abstract class PaperweightCoreExtension @Inject constructor(objects: ObjectFacto fun updatingMinecraft(action: Action) { action.execute(updatingMinecraft) } + + val validateAts: Property = objects.property().convention(false) } diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt index 776db9975..4b3599d33 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt @@ -101,6 +101,7 @@ class CoreTasks( oldPaperCommit.convention(project.coreExt.updatingMinecraft.oldPaperCommit) inputFile.set(macheDecompileJar.flatMap { it.outputJar }) predicate.set { Files.isRegularFile(it) && it.toString().endsWith(".java") } + validateAts.set(project.coreExt.validateAts) } val setupMacheSources by tasks.registering(SetupMinecraftSources::class) { diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/MinecraftPatchingTasks.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/MinecraftPatchingTasks.kt index 8de9acb5a..7f30124dd 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/MinecraftPatchingTasks.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/MinecraftPatchingTasks.kt @@ -30,6 +30,7 @@ import io.papermc.paperweight.core.tasks.patching.ApplyFilePatches import io.papermc.paperweight.core.tasks.patching.ApplyFilePatchesFuzzy import io.papermc.paperweight.core.tasks.patching.FixupFilePatches import io.papermc.paperweight.core.tasks.patching.RebuildFilePatches +import io.papermc.paperweight.core.util.coreExt import io.papermc.paperweight.tasks.* import io.papermc.paperweight.util.* import io.papermc.paperweight.util.constants.* @@ -171,6 +172,7 @@ class MinecraftPatchingTasks( atFile.set(mergeCollectedAts.flatMap { it.outputFile }) ats.jst.from(project.configurations.named(JST_CONFIG)) ats.jstClasspath.from(project.configurations.named(MACHE_MINECRAFT_LIBRARIES_CONFIG)) + validateAts.set(project.coreExt.validateAts) } applySourcePatches.configure { diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupForkMinecraftSources.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupForkMinecraftSources.kt index 673a0b94d..976686c9a 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupForkMinecraftSources.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupForkMinecraftSources.kt @@ -59,6 +59,9 @@ abstract class SetupForkMinecraftSources : JavaLauncherTask() { @get:Optional abstract val atFile: RegularFileProperty + @get:Input + abstract val validateAts: Property + @get:Optional @get:InputDirectory abstract val libraryImports: DirectoryProperty @@ -86,6 +89,7 @@ abstract class SetupForkMinecraftSources : JavaLauncherTask() { outputDir.path, atFile.path, atWorkingDir.path, + validate = validateAts.get(), ) commitAndTag(git, "ATs", "${identifier.get()} ATs") } diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt index 70110a9c3..a5e899378 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt @@ -69,6 +69,9 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { @get:Input abstract val oldPaperCommit: Property + @get:Input + abstract val validateAts: Property + @get:Nested val ats: ApplySourceATs = objects.newInstance() @@ -182,6 +185,7 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { outputPath, atFile.path, atWorkingDir.path, + validate = validateAts.get(), ) if (!oldPaperCommit.isPresent) { commitAndTag(git, "ATs", "paper ATs") diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt index 68c016b1d..82cb14178 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt @@ -258,6 +258,7 @@ abstract class RebuildFilePatches : JavaLauncherTask() { at, temporaryDir.toPath().resolve("jst_work"), singleFile = true, + validate = false, ) println("NEW: " + decomp.readText()) } diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt index b19114435..dc6cd8d89 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt @@ -53,6 +53,7 @@ abstract class ApplySourceATs { atFile: Path, workDir: Path, singleFile: Boolean = false, + validate: Boolean, ) { workDir.deleteRecursive() workDir.createDirectories() @@ -61,7 +62,7 @@ abstract class ApplySourceATs { workDir, workDir.resolve("log.txt"), jvmArgs = listOf("-Xmx${memory.get()}"), - args = jstArgs(input, output, atFile, singleFile).toTypedArray() + args = jstArgs(input, output, atFile, singleFile, validate).toTypedArray() ) } @@ -70,8 +71,10 @@ abstract class ApplySourceATs { outputDir: Path, atFile: Path, singleFile: Boolean = false, + validate: Boolean, ): List { val format = if (singleFile) "FILE" else "FOLDER" + val validation = if (validate) "ERROR" else "LOG" return listOf( "--in-format=$format", "--out-format=$format", @@ -79,7 +82,7 @@ abstract class ApplySourceATs { "--access-transformer=$atFile", "--access-transformer-inherit-method=true", "--hidden-prefix=.git", - // "--access-transformer-validation=ERROR", + "--access-transformer-validation=$validation", *jstClasspath.files.map { "--classpath=${it.absolutePath}" }.toTypedArray(), inputDir.absolutePathString(), outputDir.absolutePathString(), From adf6f62513ed71bea9d3677f1b4e2ca58cd0ebb8 Mon Sep 17 00:00:00 2001 From: Toffikk Date: Sun, 25 Jan 2026 17:38:47 +0100 Subject: [PATCH 2/7] fix: provide a default --- .../io/papermc/paperweight/core/taskcontainers/CoreTasks.kt | 2 +- .../papermc/paperweight/core/tasks/SetupMinecraftSources.kt | 1 + .../paperweight/core/tasks/patching/RebuildFilePatches.kt | 1 - .../kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt index 4b3599d33..29b3490de 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt @@ -101,7 +101,6 @@ class CoreTasks( oldPaperCommit.convention(project.coreExt.updatingMinecraft.oldPaperCommit) inputFile.set(macheDecompileJar.flatMap { it.outputJar }) predicate.set { Files.isRegularFile(it) && it.toString().endsWith(".java") } - validateAts.set(project.coreExt.validateAts) } val setupMacheSources by tasks.registering(SetupMinecraftSources::class) { @@ -113,6 +112,7 @@ class CoreTasks( atFile.set(mergePaperATs.flatMap { it.outputFile }) ats.jstClasspath.from(project.configurations.named(MACHE_MINECRAFT_LIBRARIES_CONFIG)) ats.jst.from(project.configurations.named(JST_CONFIG)) + validateAts.set(project.coreExt.validateAts) } val extractMacheSources by tasks.registering(ExtractMinecraftSources::class) { diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt index a5e899378..0ffac1187 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt @@ -86,6 +86,7 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { override fun init() { super.init() atWorkingDir.set(layout.cache.resolve(paperTaskOutput(name = "${name}_atWorkingDir"))) + validateAts.convention(false) } override fun run(outputPath: Path) { diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt index 82cb14178..68c016b1d 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt @@ -258,7 +258,6 @@ abstract class RebuildFilePatches : JavaLauncherTask() { at, temporaryDir.toPath().resolve("jst_work"), singleFile = true, - validate = false, ) println("NEW: " + decomp.readText()) } diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt index dc6cd8d89..137334d61 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt @@ -53,7 +53,7 @@ abstract class ApplySourceATs { atFile: Path, workDir: Path, singleFile: Boolean = false, - validate: Boolean, + validate: Boolean = false, ) { workDir.deleteRecursive() workDir.createDirectories() @@ -71,7 +71,7 @@ abstract class ApplySourceATs { outputDir: Path, atFile: Path, singleFile: Boolean = false, - validate: Boolean, + validate: Boolean = false, ): List { val format = if (singleFile) "FILE" else "FOLDER" val validation = if (validate) "ERROR" else "LOG" From c635f8eaae85478a981d4b7bd485003bbcc1b3d6 Mon Sep 17 00:00:00 2001 From: Toffikk Date: Sun, 25 Jan 2026 17:49:20 +0100 Subject: [PATCH 3/7] fix: don't default to false, always require it to be set --- .../papermc/paperweight/core/tasks/SetupMinecraftSources.kt | 2 +- .../paperweight/core/tasks/patching/RebuildFilePatches.kt | 1 + .../kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt index 0ffac1187..ca8da3bf5 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt @@ -85,8 +85,8 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { override fun init() { super.init() - atWorkingDir.set(layout.cache.resolve(paperTaskOutput(name = "${name}_atWorkingDir"))) validateAts.convention(false) + atWorkingDir.set(layout.cache.resolve(paperTaskOutput(name = "${name}_atWorkingDir"))) } override fun run(outputPath: Path) { diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt index 68c016b1d..82cb14178 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt @@ -258,6 +258,7 @@ abstract class RebuildFilePatches : JavaLauncherTask() { at, temporaryDir.toPath().resolve("jst_work"), singleFile = true, + validate = false, ) println("NEW: " + decomp.readText()) } diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt index 137334d61..dc6cd8d89 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/util/ApplySourceATs.kt @@ -53,7 +53,7 @@ abstract class ApplySourceATs { atFile: Path, workDir: Path, singleFile: Boolean = false, - validate: Boolean = false, + validate: Boolean, ) { workDir.deleteRecursive() workDir.createDirectories() @@ -71,7 +71,7 @@ abstract class ApplySourceATs { outputDir: Path, atFile: Path, singleFile: Boolean = false, - validate: Boolean = false, + validate: Boolean, ): List { val format = if (singleFile) "FILE" else "FOLDER" val validation = if (validate) "ERROR" else "LOG" From 456e77959237e94d3929fc360005b6acb218b498 Mon Sep 17 00:00:00 2001 From: Toffikk Date: Sun, 25 Jan 2026 20:24:15 +0100 Subject: [PATCH 4/7] fix: mark validateAts as optional --- .../io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt index ca8da3bf5..1ff859996 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt @@ -69,6 +69,7 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { @get:Input abstract val oldPaperCommit: Property + @get:Optional @get:Input abstract val validateAts: Property @@ -85,7 +86,6 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { override fun init() { super.init() - validateAts.convention(false) atWorkingDir.set(layout.cache.resolve(paperTaskOutput(name = "${name}_atWorkingDir"))) } From 42182b22712718c8db1a25e929e2b6ff8ca15c5e Mon Sep 17 00:00:00 2001 From: Toffikk Date: Thu, 12 Feb 2026 00:39:45 +0100 Subject: [PATCH 5/7] chore: capitalise ATs --- .../paperweight/core/extension/PaperweightCoreExtension.kt | 2 +- .../io/papermc/paperweight/core/taskcontainers/CoreTasks.kt | 2 +- .../paperweight/core/taskcontainers/MinecraftPatchingTasks.kt | 2 +- .../paperweight/core/tasks/SetupForkMinecraftSources.kt | 4 ++-- .../papermc/paperweight/core/tasks/SetupMinecraftSources.kt | 4 ++-- .../patcher/extension/PaperweightPatcherExtension.kt | 1 + 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt index df3b973a0..a725e68ef 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt @@ -80,5 +80,5 @@ abstract class PaperweightCoreExtension @Inject constructor(objects: ObjectFacto action.execute(updatingMinecraft) } - val validateAts: Property = objects.property().convention(false) + val validateATs: Property = objects.property().convention(false) } diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt index 29b3490de..6a30dd86d 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/CoreTasks.kt @@ -112,7 +112,7 @@ class CoreTasks( atFile.set(mergePaperATs.flatMap { it.outputFile }) ats.jstClasspath.from(project.configurations.named(MACHE_MINECRAFT_LIBRARIES_CONFIG)) ats.jst.from(project.configurations.named(JST_CONFIG)) - validateAts.set(project.coreExt.validateAts) + validateATs.set(project.coreExt.validateATs) } val extractMacheSources by tasks.registering(ExtractMinecraftSources::class) { diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/MinecraftPatchingTasks.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/MinecraftPatchingTasks.kt index 7f30124dd..0bb22cfc0 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/MinecraftPatchingTasks.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/taskcontainers/MinecraftPatchingTasks.kt @@ -172,7 +172,7 @@ class MinecraftPatchingTasks( atFile.set(mergeCollectedAts.flatMap { it.outputFile }) ats.jst.from(project.configurations.named(JST_CONFIG)) ats.jstClasspath.from(project.configurations.named(MACHE_MINECRAFT_LIBRARIES_CONFIG)) - validateAts.set(project.coreExt.validateAts) + validateATs.set(project.coreExt.validateATs) } applySourcePatches.configure { diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupForkMinecraftSources.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupForkMinecraftSources.kt index 976686c9a..362c32322 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupForkMinecraftSources.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupForkMinecraftSources.kt @@ -60,7 +60,7 @@ abstract class SetupForkMinecraftSources : JavaLauncherTask() { abstract val atFile: RegularFileProperty @get:Input - abstract val validateAts: Property + abstract val validateATs: Property @get:Optional @get:InputDirectory @@ -89,7 +89,7 @@ abstract class SetupForkMinecraftSources : JavaLauncherTask() { outputDir.path, atFile.path, atWorkingDir.path, - validate = validateAts.get(), + validate = validateATs.get(), ) commitAndTag(git, "ATs", "${identifier.get()} ATs") } diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt index 1ff859996..3262c5da8 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/SetupMinecraftSources.kt @@ -71,7 +71,7 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { @get:Optional @get:Input - abstract val validateAts: Property + abstract val validateATs: Property @get:Nested val ats: ApplySourceATs = objects.newInstance() @@ -186,7 +186,7 @@ abstract class SetupMinecraftSources : JavaLauncherZippedTask() { outputPath, atFile.path, atWorkingDir.path, - validate = validateAts.get(), + validate = validateATs.get(), ) if (!oldPaperCommit.isPresent) { commitAndTag(git, "ATs", "paper ATs") diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/patcher/extension/PaperweightPatcherExtension.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/patcher/extension/PaperweightPatcherExtension.kt index 18fbc9591..bf374a7bf 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/patcher/extension/PaperweightPatcherExtension.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/patcher/extension/PaperweightPatcherExtension.kt @@ -36,6 +36,7 @@ abstract class PaperweightPatcherExtension @Inject constructor(private val objec val gitFilePatches: Property = objects.property().convention(false) val filterPatches: Property = objects.property().convention(true) + val validateATs: Property = objects.property().convention(false) val upstreams: NamedDomainObjectContainer = objects.domainObjectContainer(UpstreamConfig::class) { objects.newInstance(it, true) From a70572d3bc20e6252a0e9107895cea32101c3287 Mon Sep 17 00:00:00 2001 From: Toffikk Date: Fri, 24 Apr 2026 22:18:13 +0200 Subject: [PATCH 6/7] tweak some defaults --- .../paperweight/core/extension/PaperweightCoreExtension.kt | 2 +- .../paperweight/core/tasks/patching/RebuildFilePatches.kt | 2 +- .../patcher/extension/PaperweightPatcherExtension.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt index 30e37cefe..b3147af86 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/extension/PaperweightCoreExtension.kt @@ -67,5 +67,5 @@ abstract class PaperweightCoreExtension @Inject constructor(objects: ObjectFacto action.execute(updatingMinecraft) } - val validateATs: Property = objects.property().convention(false) + val validateATs: Property = objects.property().convention(true) } diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt index 82cb14178..7df48ed5f 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/core/tasks/patching/RebuildFilePatches.kt @@ -258,7 +258,7 @@ abstract class RebuildFilePatches : JavaLauncherTask() { at, temporaryDir.toPath().resolve("jst_work"), singleFile = true, - validate = false, + validate = true, ) println("NEW: " + decomp.readText()) } diff --git a/paperweight-core/src/main/kotlin/io/papermc/paperweight/patcher/extension/PaperweightPatcherExtension.kt b/paperweight-core/src/main/kotlin/io/papermc/paperweight/patcher/extension/PaperweightPatcherExtension.kt index bf374a7bf..66dca511f 100644 --- a/paperweight-core/src/main/kotlin/io/papermc/paperweight/patcher/extension/PaperweightPatcherExtension.kt +++ b/paperweight-core/src/main/kotlin/io/papermc/paperweight/patcher/extension/PaperweightPatcherExtension.kt @@ -36,7 +36,7 @@ abstract class PaperweightPatcherExtension @Inject constructor(private val objec val gitFilePatches: Property = objects.property().convention(false) val filterPatches: Property = objects.property().convention(true) - val validateATs: Property = objects.property().convention(false) + val validateATs: Property = objects.property().convention(true) val upstreams: NamedDomainObjectContainer = objects.domainObjectContainer(UpstreamConfig::class) { objects.newInstance(it, true) From 1eb8d802496999c35a85bdc4102d62b94c883639 Mon Sep 17 00:00:00 2001 From: Toffikk Date: Mon, 18 May 2026 18:40:36 +0200 Subject: [PATCH 7/7] try to fix tests --- .../src/test/resources/functional_test/test-server/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/paperweight-core/src/test/resources/functional_test/test-server/build.gradle b/paperweight-core/src/test/resources/functional_test/test-server/build.gradle index a2065f984..58992ace7 100644 --- a/paperweight-core/src/test/resources/functional_test/test-server/build.gradle +++ b/paperweight-core/src/test/resources/functional_test/test-server/build.gradle @@ -28,6 +28,7 @@ dependencies { } paperweight { + validateATs = false if (fake) { // use fake mojang data for testing minecraftVersion = 'fake'