Skip to content

Commit

Permalink
Merge branch 'version/7.3.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Jun 19, 2024
2 parents 0014830 + 54d5665 commit e74dccf
Show file tree
Hide file tree
Showing 81 changed files with 9,168 additions and 310 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
7.3.4
- Added support for 1.21

7.3.3
- [Sponge] Re-add Sponge support
- [NeoForge] Update NeoForge version to workaround API break

7.3.2
- [Paper] Worked around future Paper API change to prevent compatibility issues
- [Bukkit] Dropped 1.19.4-1.20.1 support due to tooling compatibility issues
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Thank you for your interest in contributing to WorldEdit! We appreciate your
effort, but to make sure that the inclusion of your patch is a smooth process, we
ask that you make note of the following guidelines.

* **Target Java 16 for source and compilation.** Make sure to mark methods with
* **Target Java 21 for source and compilation.** Make sure to mark methods with
` @Override` that override methods of parent classes, or that implement
methods of interfaces.
* **Use only spaces for indentation.** Our indents are 4-spaces long, and tabs
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Edit the Code
Want to add new features to WorldEdit or fix bugs yourself? You can get the game running, with WorldEdit, from the code here, without any additional outside steps, by doing the following *four* things:

1. Download WorldEdit's source code and put it somewhere. We recommend you use something called Git if you already know how to use it, but [you can also just download a .zip file](https://github.com/EngineHub/WorldEdit/archive/master.zip). (If you plan on contributing the changes, you will need to figure out Git.)
2. Install any version of Java greater than or equal to 16.
* Note that if you do _not_ install JDK 16 exactly, Gradle will download it for you on first run. However, it is still required to have some form of Java installed for Gradle to start at all.
2. Install any version of Java greater than or equal to 21.
* Note that if you do _not_ install JDK 21 exactly, Gradle will download it for you on first run. However, it is still required to have some form of Java installed for Gradle to start at all.
3. Open terminal / command prompt / bash and navigate to the directory where you put the source code.
4. Run **one** of these following commands:
* Mac OS X / Linux: `./gradlew :worldedit-fabric:runClient`
Expand Down
8 changes: 8 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ repositories {
name = "EngineHub Repository"
url = uri("https://maven.enginehub.org/repo/")
}
maven {
name = "SpongePowered"
url = uri("https://repo.spongepowered.org/repository/maven-public/")
}
}

dependencies {
Expand All @@ -19,6 +23,10 @@ dependencies {
implementation(libs.jfrog.buildinfo)
implementation(libs.paperweight)
implementation(libs.gson)

implementation(libs.sponge.vanillagradle)
implementation(libs.neogradle.neoform)

constraints {
val asmVersion = "[${libs.versions.minimumAsm.get()},)"
implementation("org.ow2.asm:asm:$asmVersion") {
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
group=com.sk89q.worldedit
version=7.4.0-SNAPSHOT


org.gradle.jvmargs=-Xmx1G
org.gradle.jvmargs=-Xmx1500M
org.gradle.parallel=true
2 changes: 2 additions & 0 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#This file is generated by updateDaemonJvm
toolchainVersion=21
35 changes: 24 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
[plugins]
codecov = "org.enginehub.codecov:0.2.0"
neogradle-userdev = "net.neoforged.gradle.userdev:7.0.107"
fabric-loom = "fabric-loom:1.6.9"
neogradle-userdev = "net.neoforged.gradle.userdev:7.0.142"
fabric-loom = "fabric-loom:1.6.12"
sponge-spongegradle = "org.spongepowered.gradle.plugin:2.2.0"
sponge-vanillagradle = { id = "org.spongepowered.gradle.vanilla", version.ref = "sponge-vanillagradle" }

[versions]
kyoriText = "3.0.4"
piston = "0.5.10"
autoValue = "1.10.4"
antlr = "4.13.1"

fabric-api = "0.97.8+1.20.6"
fabric-api = "0.100.3+1.21"

neoforge-minecraft = "1.20.6"
neoforge-minecraft = "1.21"

sponge-minecraft = "1.21"
# https://repo.spongepowered.org/service/rest/repository/browse/maven-public/org/spongepowered/spongeapi/
sponge-api = "12.0.0-20240616.151530-3"
sponge-api-major = "12"

# https://parchmentmc.org/docs/getting-started; note that we use older MC versions some times which is OK
parchment-minecraft = "1.20.4"
parchment-mappings = "2024.04.14"
parchment-minecraft = "1.20.6"
parchment-mappings = "2024.06.16"

# https://repo.spongepowered.org/service/rest/repository/browse/maven-public/org/spongepowered/vanillagradle/
sponge-vanillagradle = "0.2.1-20240617.053350-83"

# Minimum versions we apply to make dependencies support newer Java
minimumAsm = "9.7"
minimumJdependency = "2.10"
minimumTinyRemapper = "0.8.11"

lang-worldeditBase = "7.3.1"
lang-version = "1309"
lang-worldeditBase = "7.3.4"
lang-version = "1450"

[libraries]
neogradle-neoform = "net.neoforged.gradle:neoform:7.0.142"
sponge-vanillagradle = { module = "org.spongepowered:vanillagradle", version.ref = "sponge-vanillagradle" }

licenser = "gradle.plugin.org.cadixdev.gradle:licenser:0.6.1"
grgit = "org.ajoberstar.grgit:grgit-gradle:5.2.2"
japicmp = "me.champeau.gradle:japicmp-gradle-plugin:0.4.2"
Expand Down Expand Up @@ -71,11 +84,11 @@ rhino = "org.mozilla:rhino-runtime:1.7.13"
jchronic = "com.sk89q:jchronic:0.2.4a"
jlibnoise = "com.sk89q.lib:jlibnoise:1.0.0"

fabric-minecraft = "com.mojang:minecraft:1.20.6"
fabric-loader = "net.fabricmc:fabric-loader:0.15.10"
fabric-minecraft = "com.mojang:minecraft:1.21"
fabric-loader = "net.fabricmc:fabric-loader:0.15.11"
fabric-permissions-api = "me.lucko:fabric-permissions-api:0.3.1"

neoforge = "net.neoforged:neoforge:20.6.42-beta"
neoforge = "net.neoforged:neoforge:21.0.16-beta"

# Mojang-provided libraries, CHECK AGAINST MINECRAFT for versions
guava = "com.google.guava:guava:32.1.3-jre!!"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down
8 changes: 6 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ pluginManagement {
name = "EngineHub"
url = uri("https://maven.enginehub.org/repo/")
}
maven {
name = "SpongePowered"
url = uri("https://repo.spongepowered.org/repository/maven-public/")
}
}
}
plugins {
Expand All @@ -31,11 +35,11 @@ includeBuild("build-logic")

include("worldedit-libs")

listOf("1.20.2", "1.20.4", "1.20.5").forEach {
listOf("1.20.2", "1.20.4", "1.20.6", "1.21").forEach {
include("worldedit-bukkit:adapters:adapter-$it")
}

listOf("bukkit", "core", "fabric", "neoforge", "cli").forEach {
listOf("bukkit", "core", "fabric", "neoforge", "sponge", "cli").forEach {
include("worldedit-libs:$it")
include("worldedit-$it")
}
Expand Down
2 changes: 1 addition & 1 deletion verification/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ tasks.check {
// Generic setup for all tasks
// Pull the version before our current version.
val baseVersion = "(,${rootProject.version.toString().substringBefore("-SNAPSHOT")}["
for (projectFragment in listOf("bukkit", "core", "fabric", "neoforge")) {
for (projectFragment in listOf("bukkit", "core", "fabric", "neoforge", "sponge")) {
val capitalizedFragment =
projectFragment.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.ROOT) else it.toString() }
val proj = project(":worldedit-$projectFragment")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,12 @@ private BlockEntity getBlockEntity(BlockPos blockPos) {
if (tileEntity == null) {
return null;
}
BlockEntity newEntity = tileEntity.getType().create(blockPos, getBlockState(blockPos));
newEntity.loadWithComponents(
tileEntity.loadWithComponents(
(CompoundTag) adapter.fromNative(this.editSession.getFullBlock(BlockVector3.at(blockPos.getX(), blockPos.getY(), blockPos.getZ())).getNbtReference().getValue()),
this.serverLevel.registryAccess()
);

return newEntity;
return tileEntity;
}

private BlockState getBlockState(BlockPos blockPos) {
Expand Down
10 changes: 10 additions & 0 deletions worldedit-bukkit/adapters/adapter-1.21/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import io.papermc.paperweight.userdev.PaperweightUserDependenciesExtension

plugins {
id("buildlogic.adapter")
}

dependencies {
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.21-R0.1-20240618.005323-5")
}
Loading

0 comments on commit e74dccf

Please sign in to comment.