From bd87665e345f6a95e3a4d0177baeccfab4b66b5a Mon Sep 17 00:00:00 2001 From: wizjany Date: Thu, 11 Nov 2021 15:05:43 -0500 Subject: [PATCH] Update paperweight + userdev bundle. (#1930) * Update paperweight + userdev bundle. * remove unneeded config (set by userdev plugin already) --- buildSrc/build.gradle.kts | 2 +- buildSrc/src/main/kotlin/AdapterConfig.kt | 19 +------------------ .../adapters/adapter-1.17.1/build.gradle.kts | 2 +- .../impl/v1_17_R1_2/PaperweightAdapter.java | 2 +- worldedit-bukkit/build.gradle.kts | 3 ++- 5 files changed, 6 insertions(+), 22 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index f27a09406..117672ee3 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -52,5 +52,5 @@ implementation("net.fabricmc:fabric-loom:$loomVersion") implementation("net.fabricmc:sponge-mixin:$mixinVersion") implementation("org.enginehub.gradle:gradle-codecov-plugin:0.1.0") - implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.1.11") + implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.1.14") } diff --git a/buildSrc/src/main/kotlin/AdapterConfig.kt b/buildSrc/src/main/kotlin/AdapterConfig.kt index 6d042ee87..a120038e9 100644 --- a/buildSrc/src/main/kotlin/AdapterConfig.kt +++ b/buildSrc/src/main/kotlin/AdapterConfig.kt @@ -1,24 +1,11 @@ import io.papermc.paperweight.util.constants.REOBF_CONFIG -import org.gradle.api.Named +import io.papermc.paperweight.userdev.attribute.Obfuscation import org.gradle.api.Project -import org.gradle.api.attributes.Attribute import org.gradle.kotlin.dsl.apply import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.get import org.gradle.kotlin.dsl.named -// TODO https://github.com/PaperMC/paperweight/pull/87 -interface Obfuscation : Named { - companion object { - val OBFUSCATION_ATTRIBUTE = Attribute.of( - "org.enginehub.obfuscation", - Obfuscation::class.java - ) - const val NONE = "none" - const val REOBFUSCATED = "reobfuscated" - } -} - // For specific version pinning, see // https://papermc.io/repo/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/ fun Project.applyPaperweightAdapterConfiguration( @@ -40,8 +27,4 @@ interface Obfuscation : Named { tasks.named("assemble") { dependsOn("reobfJar") } - - configurations[REOBF_CONFIG].attributes { - attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.REOBFUSCATED)) - } } diff --git a/worldedit-bukkit/adapters/adapter-1.17.1/build.gradle.kts b/worldedit-bukkit/adapters/adapter-1.17.1/build.gradle.kts index 1559bb0b3..a5c997534 100644 --- a/worldedit-bukkit/adapters/adapter-1.17.1/build.gradle.kts +++ b/worldedit-bukkit/adapters/adapter-1.17.1/build.gradle.kts @@ -1,3 +1,3 @@ applyPaperweightAdapterConfiguration( - "1.17.1-R0.1-20211001.111503-102" + "1.17.1-R0.1-20211109.085555-183" ) diff --git a/worldedit-bukkit/adapters/adapter-1.17.1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_17_R1_2/PaperweightAdapter.java b/worldedit-bukkit/adapters/adapter-1.17.1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_17_R1_2/PaperweightAdapter.java index 00b1e6d36..c55050aa2 100644 --- a/worldedit-bukkit/adapters/adapter-1.17.1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_17_R1_2/PaperweightAdapter.java +++ b/worldedit-bukkit/adapters/adapter-1.17.1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/v1_17_R1_2/PaperweightAdapter.java @@ -600,7 +600,7 @@ private void doRegen(org.bukkit.World bukkitWorld, Region region, Extent extent, Path tempDir = Files.createTempDirectory("WorldEditWorldGen"); LevelStorageSource levelStorage = LevelStorageSource.createDefault(tempDir); ResourceKey worldDimKey = getWorldDimKey(env); - try (LevelStorageSource.LevelStorageAccess session = levelStorage.c("worldeditregentempworld", worldDimKey)) { + try (LevelStorageSource.LevelStorageAccess session = levelStorage.createAccess("worldeditregentempworld", worldDimKey)) { ServerLevel originalWorld = ((CraftWorld) bukkitWorld).getHandle(); PrimaryLevelData levelProperties = (PrimaryLevelData) originalWorld.getServer() .getWorldData().overworldData(); diff --git a/worldedit-bukkit/build.gradle.kts b/worldedit-bukkit/build.gradle.kts index a927737a1..daa355989 100644 --- a/worldedit-bukkit/build.gradle.kts +++ b/worldedit-bukkit/build.gradle.kts @@ -1,4 +1,5 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import io.papermc.paperweight.userdev.attribute.Obfuscation plugins { `java-library` @@ -32,7 +33,7 @@ isCanBeResolved = true shouldResolveConsistentlyWith(configurations["runtimeClasspath"]) attributes { - attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.REOBFUSCATED)) + attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.OBFUSCATED)) } }