Skip to content

Commit 111eebe

Browse files
committed
Merge branch 'main' into v3
# Conflicts: # worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/TransformExtent.java # worldedit-core/src/main/java/com/sk89q/worldedit/function/pattern/RandomPattern.java
2 parents fbb8a9b + c095c49 commit 111eebe

File tree

363 files changed

+5415
-3637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

363 files changed

+5415
-3637
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ body:
2727
description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first.
2828
multiple: false
2929
options:
30-
- '1.20.4'
30+
- '1.20.5/6'
3131
- '1.20'
3232
- '1.19.4'
33-
- '1.18.2'
3433
validations:
3534
required: true
3635

.github/renovate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"$schema" : "https://docs.renovatebot.com/renovate-schema.json",
33
"extends" : [
44
"config:recommended",
5-
":semanticCommitsDisabled"
5+
":semanticCommitsDisabled",
6+
"schedule:earlyMondays"
67
],
78
"automerge" : true,
89
"ignoreDeps" : [

.github/workflows/build-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
- name: Checkout Repository
1212
uses: actions/checkout@v4
1313
- name: Validate Gradle Wrapper
14-
uses: gradle/wrapper-validation-action@v2
14+
uses: gradle/actions/wrapper-validation@v3
1515
- name: Setup Java
1616
uses: actions/setup-java@v4
1717
with:
1818
distribution: temurin
1919
cache: gradle
20-
java-version: 17
20+
java-version: 21
2121
- name: Build on ${{ matrix.os }}
2222
run: ./gradlew build -s
2323
- name: Archive artifacts

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
- name: Checkout Repository
1212
uses: actions/checkout@v4
1313
- name: Validate Gradle Wrapper
14-
uses: gradle/wrapper-validation-action@v2
14+
uses: gradle/actions/wrapper-validation@v3
1515
- name: Setup Java
1616
uses: actions/setup-java@v4
1717
with:
1818
distribution: temurin
1919
cache: gradle
20-
java-version: 17
20+
java-version: 21
2121
- name: Clean Build
2222
run: ./gradlew clean build --no-daemon
2323
- name: Determine release status

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
distribution: temurin
2727
cache: gradle
28-
java-version: 17
28+
java-version: 21
2929
- name: Initialize CodeQL
3030
uses: github/codeql-action/init@v3
3131
with:

.github/workflows/label-merge-conflicts.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Label conflicting PRs
18-
uses: eps1lon/actions-label-merge-conflict@v3.0.0
18+
uses: eps1lon/actions-label-merge-conflict@v3.0.2
1919
with:
2020
dirtyLabel: "unresolved-merge-conflict"
2121
repoToken: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/upload-release-assets.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ jobs:
99
- name: Checkout Repository
1010
uses: actions/checkout@v4
1111
- name: Validate Gradle Wrapper
12-
uses: gradle/wrapper-validation-action@v2
12+
uses: gradle/actions/wrapper-validation@v3
1313
- name: Setup Java
1414
uses: actions/setup-java@v4
1515
with:
1616
distribution: temurin
1717
cache: gradle
18-
java-version: 17
18+
java-version: 21
1919
- name: Clean Build
2020
run: ./gradlew clean build --no-daemon
2121
- name: Upload Release Assets

COMPILING.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
= Compiling
55

6-
You can compile FastAsyncWorldEdit as long as you have some version of Java greater than or equal to 17 installed. Gradle will download JDK 17 specifically if needed,
6+
You can compile FastAsyncWorldEdit as long as you have some version of Java greater than or equal to 21 installed. Gradle will download JDK 21 specifically if needed,
77
but it needs some version of Java to bootstrap from.
88

9-
Note that if you have JRE 8 installed, Gradle will currently attempt to use that to compile, which will not work. It is easiest to uninstall JRE 8 and replace it with JDK 17.
9+
Note that if you have JRE 8 installed, Gradle will currently attempt to use that to compile, which will not work. It is easiest to uninstall JRE 8 and replace it with JDK 21.
1010

11-
You can get the JDK 17 link:https://adoptium.net/[here] from Adoptium.
11+
You can get the JDK 21 link:https://adoptium.net/[here] from Adoptium.
1212

1313
The build process uses Gradle, which you do *not* need to download. FastAsyncWorldEdit is a multi-module project with three active modules:
1414

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pipeline {
77
stage('Build') {
88
steps {
99
withEnv([
10-
"PATH+JAVA=${tool 'Temurin-17.0.7_7'}/bin"
10+
"PATH+JAVA=${tool 'Temurin-21.0.3_9'}/bin"
1111
]) {
1212
sh './gradlew clean build'
1313
}

build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import java.time.format.DateTimeFormatter
66
import xyz.jpenilla.runpaper.task.RunServer
77

88
plugins {
9-
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
10-
id("xyz.jpenilla.run-paper") version "2.2.3"
9+
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
10+
id("xyz.jpenilla.run-paper") version "2.3.0"
1111
}
1212

1313
if (!File("$rootDir/.git").exists()) {
@@ -34,7 +34,7 @@ logger.lifecycle("""
3434
*******************************************
3535
""")
3636

37-
var rootVersion by extra("2.9.2")
37+
var rootVersion by extra("2.10.1")
3838
var snapshot by extra("SNAPSHOT")
3939
var revision: String by extra("")
4040
var buildNumber by extra("")
@@ -83,7 +83,7 @@ allprojects {
8383
}
8484

8585
applyCommonConfiguration()
86-
val supportedVersions = listOf("1.18.2", "1.19.4", "1.20", "1.20.4")
86+
val supportedVersions = listOf("1.19.4", "1.20", "1.20.4", "1.20.5", "1.20.6")
8787

8888
tasks {
8989
supportedVersions.forEach {

buildSrc/build.gradle.kts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,23 @@ dependencies {
2424
implementation(gradleApi())
2525
implementation("org.ajoberstar.grgit:grgit-gradle:5.2.2")
2626
implementation("com.github.johnrengelman:shadow:8.1.1")
27-
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.5.11")
27+
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.7.1")
28+
constraints {
29+
val asmVersion = "[9.7,)"
30+
implementation("org.ow2.asm:asm:$asmVersion") {
31+
because("Need Java 21 support in shadow")
32+
}
33+
implementation("org.ow2.asm:asm-commons:$asmVersion") {
34+
because("Need Java 21 support in shadow")
35+
}
36+
implementation("org.vafer:jdependency:[2.10,)") {
37+
because("Need Java 21 support in shadow")
38+
}
39+
}
2840
}
2941

3042
kotlin {
3143
jvmToolchain {
32-
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(17))
44+
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(21))
3345
}
3446
}

buildSrc/src/main/kotlin/CommonConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fun Project.applyCommonConfiguration() {
3333

3434
plugins.withId("java") {
3535
the<JavaPluginExtension>().toolchain {
36-
languageVersion.set(JavaLanguageVersion.of(17))
36+
languageVersion.set(JavaLanguageVersion.of(21))
3737
}
3838
}
3939

buildSrc/src/main/kotlin/CommonJavaConfig.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, banSlf4j: Boolean
2121
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
2222
.configureEach {
2323
val disabledLint = listOf(
24-
"processing", "path", "fallthrough", "serial"
24+
"processing", "path", "fallthrough", "serial", "overloads", "this-escape",
2525
)
2626
options.release.set(17)
2727
options.compilerArgs.addAll(listOf("-Xlint:all") + disabledLint.map { "-Xlint:-$it" })
@@ -31,7 +31,7 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, banSlf4j: Boolean
3131
}
3232

3333
configurations.all {
34-
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
34+
attributes.attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21)
3535
}
3636

3737
tasks.withType<Test>().configureEach {
@@ -61,7 +61,7 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, banSlf4j: Boolean
6161
"https://jd.advntr.dev/api/latest/",
6262
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
6363
"https://www.antlr.org/api/Java/",
64-
"https://jd.papermc.io/paper/1.20/",
64+
"https://jd.papermc.io/paper/1.20.6/",
6565
"https://intellectualsites.github.io/fastasyncworldedit-javadocs/worldedit-core/"
6666
)
6767
docTitle = "${rootProject.name}-${project.description}" + " " + "${rootProject.version}"

buildSrc/src/main/kotlin/LibsConfig.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fun Project.applyLibrariesConfiguration() {
122122
attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category.LIBRARY))
123123
attribute(Bundling.BUNDLING_ATTRIBUTE, project.objects.named(Bundling.SHADOWED))
124124
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.JAR))
125-
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
125+
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21)
126126
}
127127
outgoing.artifact(tasks.named("jar"))
128128
}
@@ -137,7 +137,7 @@ fun Project.applyLibrariesConfiguration() {
137137
attribute(Category.CATEGORY_ATTRIBUTE, project.objects.named(Category.LIBRARY))
138138
attribute(Bundling.BUNDLING_ATTRIBUTE, project.objects.named(Bundling.SHADOWED))
139139
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, project.objects.named(LibraryElements.JAR))
140-
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17)
140+
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 21)
141141
}
142142
outgoing.artifact(tasks.named("jar"))
143143
}

gradle/libs.versions.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
22
# Minecraft expectations
3-
paper = "1.20.4-R0.1-SNAPSHOT"
3+
paper = "1.20.6-R0.1-SNAPSHOT"
44
fastutil = "8.5.9"
55
guava = "31.1-jre"
66
log4j = "2.19.0"
@@ -9,44 +9,44 @@ snakeyaml = "2.0"
99

1010
# Plugins
1111
dummypermscompat = "1.10"
12-
worldguard-bukkit = "7.0.9"
12+
worldguard-bukkit = "7.0.10"
1313
mapmanager = "1.8.0-SNAPSHOT"
1414
griefprevention = "17.0.0"
1515
griefdefender = "2.1.0-SNAPSHOT"
1616
residence = "4.5._13.1"
17-
towny = "0.100.1.23"
18-
plotsquared = "7.3.6"
17+
towny = "0.100.2.12"
18+
plotsquared = "7.3.8"
1919

2020
# Third party
2121
bstats = "3.0.2"
2222
sparsebitset = "1.3"
2323
parallelgzip = "1.0.5"
24-
adventure = "4.16.0"
25-
adventure-bukkit = "4.3.2"
26-
checkerqual = "3.42.0"
24+
adventure = "4.17.0"
25+
adventure-bukkit = "4.3.3"
26+
checkerqual = "3.43.0"
2727
truezip = "6.8.4"
2828
auto-value = "1.10.4"
2929
findbugs = "3.0.2"
30-
rhino-runtime = "1.7.14"
30+
rhino-runtime = "1.7.15"
3131
zstd-jni = "1.4.8-1" # Not latest as it can be difficult to obtain latest ZSTD libs
3232
antlr4 = "4.13.1"
3333
json-simple = "1.1.1"
3434
jlibnoise = "1.0.0"
3535
jchronic = "0.2.4a"
3636
lz4-java = "1.8.0"
3737
lz4-stream = "1.0.0"
38-
commons-cli = "1.6.0"
38+
commons-cli = "1.8.0"
3939
paperlib = "1.0.8"
40-
paster = "1.1.5"
40+
paster = "1.1.6"
4141
vault = "1.7.1"
42-
serverlib = "2.3.4"
42+
serverlib = "2.3.6"
4343
## Internal
4444
text-adapter = "3.0.6"
4545
text = "3.0.4"
46-
piston = "0.5.8"
46+
piston = "0.5.10"
4747

4848
# Tests
49-
mockito = "5.11.0"
49+
mockito = "5.12.0"
5050

5151
# Gradle plugins
5252
pluginyml = "0.6.0"

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ rootProject.name = "FastAsyncWorldEdit"
22

33
include("worldedit-libs")
44

5-
listOf("1_18_2", "1_19_4", "1_20", "1_20_2", "1_20_4").forEach {
5+
listOf("1_19_4", "1_20", "1_20_2", "1_20_4", "1_20_5").forEach {
66
include("worldedit-bukkit:adapters:adapter-$it")
77
}
88

worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/ext/fawe/v1_19_R3/PaperweightAdapter.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.google.common.util.concurrent.Futures;
2828
import com.mojang.datafixers.util.Either;
2929
import com.mojang.serialization.Lifecycle;
30-
import com.sk89q.jnbt.CompoundTag;
3130
import com.sk89q.jnbt.NBTConstants;
3231
import com.sk89q.worldedit.WorldEditException;
3332
import com.sk89q.worldedit.blocks.BaseItem;
@@ -531,7 +530,7 @@ public Property<?> load(net.minecraft.world.level.block.state.properties.Propert
531530
public void sendFakeNBT(Player player, BlockVector3 pos, CompoundBinaryTag nbtData) {
532531
((CraftPlayer) player).getHandle().connection.send(ClientboundBlockEntityDataPacket.create(
533532
new StructureBlockEntity(
534-
new BlockPos(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()),
533+
new BlockPos(pos.x(), pos.y(), pos.z()),
535534
Blocks.STRUCTURE_BLOCK.defaultBlockState()
536535
),
537536
__ -> (net.minecraft.nbt.CompoundTag) fromNativeBinary(nbtData)
@@ -581,10 +580,10 @@ public boolean simulateItemUse(org.bukkit.World world, BlockVector3 position, Ba
581580
return false;
582581
}
583582
fakePlayer.setItemInHand(InteractionHand.MAIN_HAND, stack);
584-
fakePlayer.absMoveTo(position.getBlockX(), position.getBlockY(), position.getBlockZ(),
583+
fakePlayer.absMoveTo(position.x(), position.y(), position.z(),
585584
(float) face.toVector().toYaw(), (float) face.toVector().toPitch());
586585

587-
final BlockPos blockPos = new BlockPos(position.getBlockX(), position.getBlockY(), position.getBlockZ());
586+
final BlockPos blockPos = new BlockPos(position.x(), position.y(), position.z());
588587
final Vec3 blockVec = Vec3.atLowerCornerOf(blockPos);
589588
final net.minecraft.core.Direction enumFacing = adapt(face);
590589
BlockHitResult rayTrace = new BlockHitResult(blockVec, enumFacing, blockPos, false);
@@ -605,7 +604,7 @@ public boolean simulateItemUse(org.bukkit.World world, BlockVector3 position, Ba
605604
public boolean canPlaceAt(org.bukkit.World world, BlockVector3 position, BlockState blockState) {
606605
int internalId = BlockStateIdAccess.getBlockStateId(blockState);
607606
net.minecraft.world.level.block.state.BlockState blockData = Block.stateById(internalId);
608-
return blockData.canSurvive(((CraftWorld) world).getHandle(), new BlockPos(position.getX(), position.getY(), position.getZ()));
607+
return blockData.canSurvive(((CraftWorld) world).getHandle(), new BlockPos(position.x(), position.y(), position.z()));
609608
}
610609

611610
@Override
@@ -725,7 +724,7 @@ private void regenForWorld(Region region, Extent extent, ServerLevel serverWorld
725724
}
726725

727726
for (BlockVector3 vec : region) {
728-
BlockPos pos = new BlockPos(vec.getBlockX(), vec.getBlockY(), vec.getBlockZ());
727+
BlockPos pos = new BlockPos(vec.x(), vec.y(), vec.z());
729728
ChunkAccess chunk = chunks.get(new ChunkPos(pos));
730729
final net.minecraft.world.level.block.state.BlockState blockData = chunk.getBlockState(pos);
731730
int internalId = Block.getId(blockData);
@@ -738,7 +737,7 @@ private void regenForWorld(Region region, Extent extent, ServerLevel serverWorld
738737
}
739738
extent.setBlock(vec, state.toBaseBlock());
740739
if (options.shouldRegenBiomes()) {
741-
Biome origBiome = chunk.getNoiseBiome(vec.getX(), vec.getY(), vec.getZ()).value();
740+
Biome origBiome = chunk.getNoiseBiome(vec.x(), vec.y(), vec.z()).value();
742741
BiomeType adaptedBiome = adapt(serverWorld, origBiome);
743742
if (adaptedBiome != null) {
744743
extent.setBiome(vec, adaptedBiome);
@@ -757,7 +756,7 @@ private List<CompletableFuture<ChunkAccess>> submitChunkLoadTasks(Region region,
757756
//noinspection unchecked
758757
chunkLoadings.add(
759758
((CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>)
760-
getChunkFutureMethod.invoke(chunkManager, chunk.getX(), chunk.getZ(), ChunkStatus.FEATURES, true))
759+
getChunkFutureMethod.invoke(chunkManager, chunk.x(), chunk.z(), ChunkStatus.FEATURES, true))
761760
.thenApply(either -> either.left().orElse(null))
762761
);
763762
} catch (IllegalAccessException | InvocationTargetException e) {
@@ -797,7 +796,7 @@ public Set<SideEffect> getSupportedSideEffects() {
797796
public boolean clearContainerBlockContents(org.bukkit.World world, BlockVector3 pt) {
798797
ServerLevel originalWorld = ((CraftWorld) world).getHandle();
799798

800-
BlockEntity entity = originalWorld.getBlockEntity(new BlockPos(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()));
799+
BlockEntity entity = originalWorld.getBlockEntity(new BlockPos(pt.x(), pt.y(), pt.z()));
801800
if (entity instanceof Clearable) {
802801
((Clearable) entity).clearContent();
803802
return true;

worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightFaweAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public boolean canPlaceAt(org.bukkit.World world, BlockVector3 blockVector3, Blo
472472
net.minecraft.world.level.block.state.BlockState blockState1 = Block.stateById(internalId);
473473
return blockState1.hasPostProcess(
474474
getServerLevel(world),
475-
new BlockPos(blockVector3.getX(), blockVector3.getY(), blockVector3.getZ())
475+
new BlockPos(blockVector3.x(), blockVector3.y(), blockVector3.z())
476476
);
477477
}
478478

worldedit-bukkit/adapters/adapter-1_19_4/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_19_R3/PaperweightGetBlocks.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,9 @@ public synchronized <T extends Future<T>> T call(IChunkSet set, Runnable finaliz
786786
for (final Map.Entry<BlockVector3, CompoundTag> entry : tiles.entrySet()) {
787787
final CompoundTag nativeTag = entry.getValue();
788788
final BlockVector3 blockHash = entry.getKey();
789-
final int x = blockHash.getX() + bx;
790-
final int y = blockHash.getY();
791-
final int z = blockHash.getZ() + bz;
789+
final int x = blockHash.x() + bx;
790+
final int y = blockHash.y();
791+
final int z = blockHash.z() + bz;
792792
final BlockPos pos = new BlockPos(x, y, z);
793793

794794
synchronized (nmsWorld) {

0 commit comments

Comments
 (0)