From 3ad2f8b5fab19aca2fee59b6b4d6603a150a10f9 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Thu, 11 Nov 2021 22:22:44 +0100 Subject: [PATCH] Update Upstream bd87665 Update paperweight + userdev bundle. (1930) --- buildSrc/build.gradle.kts | 2 +- buildSrc/src/main/kotlin/AdapterConfig.kt | 22 +------------------ .../adapters/adapter-1_17_1/build.gradle.kts | 2 +- .../adapter/ext/fawe/PaperweightAdapter.java | 2 +- worldedit-bukkit/build.gradle.kts | 3 ++- 5 files changed, 6 insertions(+), 25 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index c2ed9bb3c..32d43750f 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -28,5 +28,5 @@ dependencies { implementation(gradleApi()) implementation("org.ajoberstar.grgit:grgit-gradle:4.1.0") implementation("gradle.plugin.com.github.johnrengelman:shadow:7.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 71cce4921..575071a42 100644 --- a/buildSrc/src/main/kotlin/AdapterConfig.kt +++ b/buildSrc/src/main/kotlin/AdapterConfig.kt @@ -1,23 +1,7 @@ -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( - "com.fastasyncworldedit.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/ @@ -40,8 +24,4 @@ fun Project.applyPaperweightAdapterConfiguration( 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 eb2486a16..f48780506 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/build.gradle.kts +++ b/worldedit-bukkit/adapters/adapter-1_17_1/build.gradle.kts @@ -3,7 +3,7 @@ plugins { } applyPaperweightAdapterConfiguration( - "1.17.1-R0.1-20211001.111503-102" + "1.17.1-R0.1-20211109.085555-183" ) repositories { diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightAdapter.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightAdapter.java index 3df9758e9..9de853cdd 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightAdapter.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/PaperweightAdapter.java @@ -605,7 +605,7 @@ public final class PaperweightAdapter implements BukkitImplAdapter 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 16775aa58..447c05dad 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` @@ -59,7 +60,7 @@ val adapters = configurations.create("adapters") { isCanBeResolved = true shouldResolveConsistentlyWith(configurations["runtimeClasspath"]) attributes { - attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.REOBFUSCATED)) + attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.OBFUSCATED)) } }