Skip to content

Commit

Permalink
Merge pull request #2549 from EngineHub/ot/feature/1.21
Browse files Browse the repository at this point in the history
Minecraft 1.21
  • Loading branch information
octylFractal authored Jun 18, 2024
2 parents 9ca8c0f + de2f398 commit ca2febe
Show file tree
Hide file tree
Showing 49 changed files with 4,933 additions and 313 deletions.
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
2 changes: 1 addition & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
implementation(libs.gson)

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

constraints {
val asmVersion = "[${libs.versions.minimumAsm.get()},)"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=com.sk89q.worldedit
version=7.3.4-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
36 changes: 22 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
[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 = "org.spongepowered.gradle.vanilla:0.2.1-20240507.024226-82"
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-userdev = "net.neoforged.gradle:neoform:7.0.107"
sponge-vanillagradle = "org.spongepowered:vanillagradle:0.2.1-20240507.024226-82"
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"
Expand Down Expand Up @@ -76,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.88-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
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ 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")
}

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 ca2febe

Please sign in to comment.