From e371bb16e153dc785e0675e4bec0e5521f87eb6f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 10:08:52 +0100 Subject: [PATCH 01/17] build: Update dependency gradle to v7.3.1 (#1446) Co-authored-by: Renovate Bot --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fbce071a3..3cd8500c1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 0fe847c69a63c747c3a61d1feb994737dc1496d2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 10:11:08 +0100 Subject: [PATCH 02/17] build: Update dependency com.github.TownyAdvanced:Towny to v0.97.5.0 (#1445) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index de30c37ee..aa9981995 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,7 +17,7 @@ griefprevention = "16.17.1" griefdefender = "920a610" mcore = "7.0.1" residence = "4.5._13.1" -towny = "0.97.2.15" +towny = "0.97.5.0" protocollib = "4.7.0" plotsquaredV6 = "6.1.4" plotsquaredV4 = "4.514" From ec690f888b9328d25495785ec9343953e87e91f2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 10:22:37 +0100 Subject: [PATCH 03/17] build: Update plugin pluginyml to v0.5.1 (#1448) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index aa9981995..2b62f9651 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -55,7 +55,7 @@ mockito = "4.1.0" checker-qual = "3.19.0" # Gradle plugins -pluginyml = "0.5.0" +pluginyml = "0.5.1" [libraries] # Minecraft expectations From e0e36883615ac8f4903f12e848535a8cc53598ea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 10:22:44 +0100 Subject: [PATCH 04/17] build: Update dependency org.ajoberstar.grgit:grgit-gradle to v4.1.1 (#1447) Co-authored-by: Renovate Bot --- buildSrc/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 32d43750f..9a3cf25ec 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -26,7 +26,7 @@ val properties = Properties().also { props -> dependencies { implementation(gradleApi()) - implementation("org.ajoberstar.grgit:grgit-gradle:4.1.0") + implementation("org.ajoberstar.grgit:grgit-gradle:4.1.1") implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.0") implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.1.14") } From 781bfc542fb02ac3c35bf4a80c6ef21802b2bb81 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Mon, 6 Dec 2021 08:31:46 -0500 Subject: [PATCH 05/17] fix: Properly delete ChangeSets on history clear (#1413) Fixes #1347 Co-authored-by: Jordan Co-authored-by: Alex --- .../main/java/com/sk89q/worldedit/LocalSession.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java index 55a899bab..f0a079e67 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java @@ -398,9 +398,20 @@ public class LocalSession implements TextureHolder { * Clear history. */ public void clearHistory() { - history.clear(); //FAWE start + historyWriteLock.lock(); + try { + // Ensure that changesets are properly removed + for (Object item : history) { + getChangeSet(item).delete(); + } + history.clear(); + } finally { + historyWriteLock.unlock(); + } + historyNegativeIndex = 0; + save(); historySize = 0; currentWorld = null; //FAWE end From 5367921496d5ed90c1a759a8874ab50e69b40949 Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Tue, 7 Dec 2021 12:59:58 +0100 Subject: [PATCH 06/17] fix: Use WE PaperweightAdapter for seed replacement (#1440) * Use WE PaperweightAdapter for seed replacement also, only replace when necessary * fix comments * ci: Provide basic Jenkinsfile for ghprb pipeline (#1451) Co-authored-by: Alex --- Jenkinsfile | 10 +++++ .../adapter/ext/fawe/PaperweightAdapter.java | 8 +++- .../v1_17_R1_2/regen/PaperweightRegen.java | 42 +++---------------- 3 files changed, 22 insertions(+), 38 deletions(-) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..466a35458 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,10 @@ +pipeline { + agent any + stages { + stage('Build pull request') { + steps { + sh './gradlew clean build' + } + } + } +} 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 9de853cdd..3cc940eb7 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 @@ -658,7 +658,9 @@ public final class PaperweightAdapter implements BukkitImplAdapter public static + public static WorldGenSettings replaceSeed(ServerLevel originalWorld, long seed, WorldGenSettings originalOpts) { + // FAWE end RegistryWriteOps nbtReadRegOps = RegistryWriteOps.create( NbtOps.INSTANCE, originalWorld.getServer().registryAccess() @@ -685,8 +687,10 @@ public final class PaperweightAdapter implements BukkitImplAdapter private static @SuppressWarnings("unchecked") - private Dynamic recursivelySetSeed( + private static Dynamic recursivelySetSeed( + // FAWE end Dynamic dynamic, long seed, Set> seen diff --git a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/regen/PaperweightRegen.java b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/regen/PaperweightRegen.java index b48678167..2e16b9f28 100644 --- a/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/regen/PaperweightRegen.java +++ b/worldedit-bukkit/adapters/adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2/regen/PaperweightRegen.java @@ -9,9 +9,9 @@ import com.fastasyncworldedit.core.util.TaskManager; import com.google.common.collect.ImmutableList; import com.mojang.datafixers.util.Either; import com.mojang.serialization.Codec; -import com.mojang.serialization.Dynamic; import com.mojang.serialization.Lifecycle; import com.sk89q.worldedit.bukkit.adapter.Refraction; +import com.sk89q.worldedit.bukkit.adapter.ext.fawe.PaperweightAdapter; import com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_17_R1_2.PaperweightGetBlocks; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.internal.util.LogManagerCompat; @@ -21,12 +21,9 @@ import com.sk89q.worldedit.world.RegenOptions; import io.papermc.lib.PaperLib; import net.minecraft.core.MappedRegistry; import net.minecraft.core.Registry; -import net.minecraft.core.RegistryAccess; import net.minecraft.data.BuiltinRegistries; import net.minecraft.data.worldgen.biome.Biomes; import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.NbtOps; -import net.minecraft.resources.RegistryReadOps; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.MinecraftServer; @@ -78,12 +75,10 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.nio.file.Path; import java.util.Collections; -import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Random; -import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.function.BooleanSupplier; @@ -220,19 +215,11 @@ public class PaperweightRegen extends Regenerator nbtRegOps = RegistryReadOps.createAndLoad( - NbtOps.INSTANCE, server.resources.getResourceManager(), - RegistryAccess.builtin() - ); - WorldGenSettings newOpts = WorldGenSettings.CODEC - .encodeStart(nbtRegOps, levelProperties.worldGenSettings()) - .flatMap(tag -> WorldGenSettings.CODEC.parse(this.recursivelySetSeed( - new Dynamic<>(nbtRegOps, tag), - seed, - new HashSet<>() - ))) - .result() - .orElseThrow(() -> new IllegalStateException("Unable to map GeneratorOptions")); + WorldGenSettings originalOpts = levelProperties.worldGenSettings(); + + WorldGenSettings newOpts = options.getSeed().isPresent() + ? PaperweightAdapter.replaceSeed(originalServerWorld, seed, originalOpts) + : originalOpts; LevelSettings newWorldSettings = new LevelSettings( "worldeditregentempworld", originalWorldData.settings.gameType(), @@ -438,23 +425,6 @@ public class PaperweightRegen extends Regenerator recursivelySetSeed( - Dynamic dynamic, - long seed, - Set> dynamicSet - ) { - return !dynamicSet.add(dynamic) ? dynamic : dynamic.updateMapValues((pair) -> { - if (pair.getFirst().asString("").equals("seed")) { - return pair.mapSecond((v) -> v.createLong(seed)); - } else { - return ((Dynamic) pair.getSecond()).getValue() instanceof CompoundTag - ? pair.mapSecond((v) -> this.recursivelySetSeed((Dynamic) v, seed, dynamicSet)) - : pair; - - } - }); - } - private BiomeSource fastOverworldBiomeSource(BiomeSource biomeSource) throws Exception { Field legacyBiomeInitLayerField = OverworldBiomeSource.class.getDeclaredField( Refraction.pickName("legacyBiomeInitLayer", "i")); From 9fdff97e29b53bb71d57150f7d23dabb232acecd Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 10 Dec 2021 16:20:15 +0100 Subject: [PATCH 07/17] build: Update paperweight (#1454) --- worldedit-bukkit/adapters/adapter-1_17_1/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 218701aae..a6dc955ef 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-20211120.192557-194" + "1.17.1-R0.1-20211210.043523-198" ) repositories { From 1f0f07919354cf747f27faeccbefef646c9f1ed3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Dec 2021 14:22:29 +0100 Subject: [PATCH 08/17] build: Update com.plotsquared to v6.2.0 (#1462) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2b62f9651..4b7a28552 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -19,7 +19,7 @@ mcore = "7.0.1" residence = "4.5._13.1" towny = "0.97.5.0" protocollib = "4.7.0" -plotsquaredV6 = "6.1.4" +plotsquaredV6 = "6.2.0" plotsquaredV4 = "4.514" redprotect = "1.9.6" From a36002649089d10278581a383386631c040f1776 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 13 Dec 2021 17:25:07 +0000 Subject: [PATCH 09/17] build: Update dependency org.checkerframework:checker-qual to v3.20.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4b7a28552..0e458fcea 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -52,7 +52,7 @@ piston = "0.5.7" # Tests mockito = "4.1.0" -checker-qual = "3.19.0" +checker-qual = "3.20.0" # Gradle plugins pluginyml = "0.5.1" From a7b45e7f5423202f194ecfb88cec0e1f0dc6f289 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 13 Dec 2021 19:01:34 +0000 Subject: [PATCH 10/17] build: Update org.apache.logging.log4j to v2.15.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4b7a28552..1a539b264 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] # Minecraft expectations fastutil = "8.2.1" -log4j = "2.14.1" +log4j = "2.15.0" guava = "21.0" gson = "2.8.0" From 4a6e2a87aa838281d61e8465784bc719a1ac6dde Mon Sep 17 00:00:00 2001 From: "whitesource-bolt-for-github[bot]" <42819689+whitesource-bolt-for-github[bot]@users.noreply.github.com> Date: Sat, 18 Dec 2021 13:30:02 +0100 Subject: [PATCH 11/17] Configure WhiteSource Bolt for GitHub (#1468) * Add .whitesource configuration file * chore: Update bolt Co-authored-by: whitesource-bolt-for-github[bot] <42819689+whitesource-bolt-for-github[bot]@users.noreply.github.com> Co-authored-by: NotMyFault --- .whitesource | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .whitesource diff --git a/.whitesource b/.whitesource new file mode 100644 index 000000000..fec7e1e09 --- /dev/null +++ b/.whitesource @@ -0,0 +1,13 @@ +{ + "scanSettings": { + "baseBranches": ["main"] + }, + "checkRunSettings": { + "vulnerableCheckRunConclusionLevel": "failure", + "displayMode": "diff" + }, + "issueSettings": { + "minSeverityLevel": "LOW" + }, + "enableRenovate": "true" +} \ No newline at end of file From 511036be238ad1a14701368497efcf0e7b98db77 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 11:59:39 +0100 Subject: [PATCH 12/17] build: Update dependency gradle to v7.3.2 (#1473) Co-authored-by: Renovate Bot --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3cd8500c1..ac0b842f1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 99da51270a3a0b74e7432f402f8c272ee8b51f6a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 12:23:07 +0100 Subject: [PATCH 13/17] build: Update dependency gradle.plugin.com.github.johnrengelman:shadow to v7.1.1 (#1474) Co-authored-by: Renovate Bot --- buildSrc/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 9a3cf25ec..cd2119fe7 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -27,6 +27,6 @@ val properties = Properties().also { props -> dependencies { implementation(gradleApi()) implementation("org.ajoberstar.grgit:grgit-gradle:4.1.1") - implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.0") + implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.1") implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.1.14") } From fc56304af2c4de372a5ec0750e0b009187f16ef5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 12:23:15 +0100 Subject: [PATCH 14/17] build: Update com.google.auto.value to v1.9 (#1475) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3b2d9c50b..23ba4f942 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -33,7 +33,7 @@ sparsebitset = "1.2" parallelgzip = "1.0.5" adventure = "4.9.3" truezip = "6.8.4" -auto-value = "1.8.2" +auto-value = "1.9" findbugs = "3.0.2" rhino-runtime = "1.7.13" zstd-jni = "1.4.8-1" # Not latest as it can be difficult to obtain latest ZSTD libs From 0e0883cfb8f864051fffbfe1dcb4eaa7d3a14266 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 17:06:53 +0100 Subject: [PATCH 15/17] build: Update dependency org.mockito:mockito-core to v4.2.0 (#1479) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- worldedit-sponge/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 23ba4f942..21fb51e02 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -51,7 +51,7 @@ text = "3.0.4" piston = "0.5.7" # Tests -mockito = "4.1.0" +mockito = "4.2.0" checker-qual = "3.20.0" # Gradle plugins diff --git a/worldedit-sponge/build.gradle.kts b/worldedit-sponge/build.gradle.kts index b209fd03e..dba06d1c5 100644 --- a/worldedit-sponge/build.gradle.kts +++ b/worldedit-sponge/build.gradle.kts @@ -28,7 +28,7 @@ dependencies { }) api("org.apache.logging.log4j:log4j-api") api("org.bstats:bstats-sponge:1.7") - testImplementation("org.mockito:mockito-core:4.1.0") + testImplementation("org.mockito:mockito-core:4.2.0") } <<<<<<< HEAD From c04cc7bec5e381dbbfdcc6fe4d46a2c0bc5facee Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 17:09:57 +0100 Subject: [PATCH 16/17] build: Update org.apache.logging.log4j to v2.17.0 (#1480) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 21fb51e02..84d53cc9e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] # Minecraft expectations fastutil = "8.2.1" -log4j = "2.15.0" +log4j = "2.17.0" guava = "21.0" gson = "2.8.0" From 37cc817cbef5a7af04190f292a09d72844fa70a3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 17:10:06 +0100 Subject: [PATCH 17/17] build: Update dependency org.checkerframework:checker-qual to v3.21.0 (#1478) Co-authored-by: Renovate Bot --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 84d53cc9e..aa9ed4746 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -52,7 +52,7 @@ piston = "0.5.7" # Tests mockito = "4.2.0" -checker-qual = "3.20.0" +checker-qual = "3.21.0" # Gradle plugins pluginyml = "0.5.1"