diff --git a/patches/server/Build-system-changes.patch b/patches/server/Build-system-changes.patch
index dab9856787..7b2caf51b2 100644
--- a/patches/server/Build-system-changes.patch
+++ b/patches/server/Build-system-changes.patch
@@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
              "Specification-Vendor" to "Bukkit Team",
 +            "Git-Branch" to gitBranch, // Paper
 +            "Git-Commit" to gitHash, // Paper
-+            "CraftBukkit-Package-Version" to craftbukkitPackageVersion, // Paper
++            "CraftBukkit-Package-Version" to paperweight.craftBukkitPackageVersion.get(), // Paper
          )
          for (tld in setOf("net", "com", "org")) {
              attributes("$tld/bukkit", "Sealed" to true)
diff --git a/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch
index c460296f03..8dbd0f7fec 100644
--- a/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch
+++ b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch
@@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
  }
  
- val craftbukkitPackageVersion = "1_20_R4" // Paper
+ paperweight {
 diff --git a/src/log4jPlugins/java/io/papermc/paper/logging/StacktraceDeobfuscatingRewritePolicy.java b/src/log4jPlugins/java/io/papermc/paper/logging/StacktraceDeobfuscatingRewritePolicy.java
 new file mode 100644
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
diff --git a/patches/server/Plugin-remapping.patch b/patches/server/Plugin-remapping.patch
index 0628d9dfb8..08c368cae5 100644
--- a/patches/server/Plugin-remapping.patch
+++ b/patches/server/Plugin-remapping.patch
@@ -14,25 +14,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
      testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
      implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
 +    implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins
-+}
-+
-+paperweight {
-+    craftBukkitPackageVersion.set("v1_20_R4") // also needs to be updated in MappingEnvironment
  }
  
--val craftbukkitPackageVersion = "1_20_R4" // Paper
- tasks.jar {
-     archiveClassifier.set("dev")
- 
-@@ -0,0 +0,0 @@ tasks.jar {
-             "Specification-Vendor" to "Bukkit Team",
-             "Git-Branch" to gitBranch, // Paper
-             "Git-Commit" to gitHash, // Paper
--            "CraftBukkit-Package-Version" to craftbukkitPackageVersion, // Paper
-+            "CraftBukkit-Package-Version" to paperweight.craftBukkitPackageVersion.get(), // Paper
-         )
-         for (tld in setOf("net", "com", "org")) {
-             attributes("$tld/bukkit", "Sealed" to true)
+ paperweight {
 @@ -0,0 +0,0 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM
          runtime.filterNot { it.asFile.absolutePath == vanilla }
      }
diff --git a/patches/server/Setup-Gradle-project.patch b/patches/server/Setup-Gradle-project.patch
index 2723bc7ec1..ce08f6e6b1 100644
--- a/patches/server/Setup-Gradle-project.patch
+++ b/patches/server/Setup-Gradle-project.patch
@@ -60,7 +60,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    testImplementation("org.ow2.asm:asm-tree:9.7")
 +}
 +
-+val craftbukkitPackageVersion = "1_20_R4" // Paper
++paperweight {
++    craftBukkitPackageVersion.set("v1_20_R4") // also needs to be updated in MappingEnvironment
++}
++
 +tasks.jar {
 +    archiveClassifier.set("dev")
 +
diff --git a/patches/server/Test-changes.patch b/patches/server/Test-changes.patch
index eea3a6bdf8..e001a6f2ac 100644
--- a/patches/server/Test-changes.patch
+++ b/patches/server/Test-changes.patch
@@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
  }
  
- val craftbukkitPackageVersion = "1_20_R4" // Paper
+ paperweight {
 @@ -0,0 +0,0 @@ tasks.jar {
      }
  }