Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
507b8d5
ci: Switch deployment to gh actions and use semver & java 17
NotMyFault Nov 22, 2021
705f580
build: Update core dependencies
NotMyFault Nov 22, 2021
7d5659a
ci: Snapshot builds are the default
NotMyFault Nov 22, 2021
52293f5
ci: Cleanup and finish transition
NotMyFault Nov 22, 2021
3a189f6
ci: Trigger initial sync with the OSSRH
NotMyFault Nov 22, 2021
64f3932
revert: OSSRH snapshot deployment was successful, returning to baseline
NotMyFault Nov 22, 2021
121bd58
ci: Register javadoc jar for lib artifacts
NotMyFault Nov 23, 2021
22f52fc
ci: Sign artifacts
NotMyFault Nov 25, 2021
0af0d84
build: Set kotlin jvm toolchain
NotMyFault Nov 25, 2021
2a1bef2
Merge branch 'main' into major/2.0.0/1.18
NotMyFault Nov 27, 2021
0b45248
style: Use minimized `version` output
NotMyFault Nov 29, 2021
38130f7
feat: Setup project structure for 1.18
NotMyFault Nov 29, 2021
930025a
Exclude 1.17
NotMyFault Nov 29, 2021
e296a32
Port initial paperweight classes to 1.18 folder structure
NotMyFault Nov 30, 2021
d3aaf7a
Move to Paper 1.18
NotMyFault Nov 30, 2021
1f975ac
Update templates, address JEP deprecations and place a few TODOs
NotMyFault Nov 30, 2021
6afde13
Drop Guava 21 enforcement
NotMyFault Nov 30, 2021
c697eb8
Merge branch 'main' into major/2.0.0/1.18
dordsor21 Dec 20, 2021
d6e3c33
Make 1.18 to be effectively in a usable state (#1452)
dordsor21 Dec 20, 2021
e9d97fc
Update version (checking) for semver
dordsor21 Dec 20, 2021
6350fe5
build: Fix release drafter base branch
NotMyFault Dec 20, 2021
01ce0f9
Trigger GHPRB
NotMyFault Dec 20, 2021
d611001
tests: Add resource pack methods
NotMyFault Dec 20, 2021
78aff4c
build: Update paperweight and add 1.17 again
NotMyFault Dec 21, 2021
7453f12
chore: Lazily change build delimiter
NotMyFault Dec 21, 2021
c9dc1ed
Merge branch 'main' into major/2.0.0/1.18
NotMyFault Dec 21, 2021
aff3d8b
build: Deploy API snapshots for 2.0.0
NotMyFault Dec 21, 2021
9ec829e
Update adapters jar
dordsor21 Dec 21, 2021
28f3bc6
More verbosely get block data and ensure biome layer isn't null
dordsor21 Dec 21, 2021
94b392d
refactor: Address a few `TODO 1.18`'s
NotMyFault Dec 21, 2021
a4cec49
fix: Fix `/fawe debugpaste`
NotMyFault Dec 21, 2021
6b6c945
refactor! Remove deprecations marked for removal that are not present…
dordsor21 Dec 22, 2021
d98f626
Reverse a "debug" change to BukkitImplLoader
dordsor21 Dec 22, 2021
7780275
Fix parsing of build in FaweVersion
dordsor21 Dec 22, 2021
1715f35
refactor: Do prepared statements properly
NotMyFault Dec 22, 2021
34f971c
Add classes with the correct minor version to the start of the adapte…
dordsor21 Dec 22, 2021
7da921e
refactor: Deprecate `IMP` initializors in favor of builders
NotMyFault Dec 22, 2021
ca5ad58
Fix WEManager (#1487)
Aurelien30000 Dec 23, 2021
28079e8
refactor: Also deprecated `IMP` for DBHandler
NotMyFault Dec 23, 2021
3b24a8a
Merge branch 'main' into major/2.0.0/1.18
NotMyFault Dec 25, 2021
0c8db1e
feat: Add a bunch of new types to the flora generator
NotMyFault Dec 25, 2021
0180427
use spigot-compatible palette constructor
SirYwell Dec 26, 2021
4ab140f
use spigot-compatible packet constructor
SirYwell Dec 26, 2021
a717df3
implement 1.18 regen
SirYwell Dec 26, 2021
040a011
Merge branch 'main' into major/2.0.0/1.18
NotMyFault Dec 26, 2021
0769578
return air instead of reserved on get blocks
SirYwell Dec 26, 2021
596356a
refactor: Shift `FileAlreadyExistsException` catch to a higher level
NotMyFault Dec 26, 2021
f9ecb44
read the actual block from ZeroBitStorage
SirYwell Dec 27, 2021
f236934
Add get default version min/max world height to platform
dordsor21 Dec 28, 2021
f6319d3
Add methods to CLIPlatform
dordsor21 Dec 28, 2021
36857a5
Fix #1490
dordsor21 Dec 28, 2021
3ec1912
Fix tests
dordsor21 Dec 28, 2021
d193694
Don't force tick limiter enable/disable
dordsor21 Dec 29, 2021
c28a5ee
Merge branch 'main' into major/2.0.0/1.18
dordsor21 Dec 29, 2021
5d4a2a4
Use Math.floor instead of int cast 757bef1f7d2b16317ab3d18427ad221833…
Joo200 Dec 29, 2021
bca3a1b
More precise method names in MinecraftVersion
dordsor21 Dec 29, 2021
177d731
Add back statically-set reserved IDs for air blocks only, make it cle…
dordsor21 Dec 29, 2021
1a281ba
Remove mentions of NMS from compilation instruction
dordsor21 Dec 29, 2021
48e2953
Update log4j version, update jd links to use "latest"
dordsor21 Dec 29, 2021
f388592
Move to BinaryTags where appropriate in adapters
dordsor21 Dec 29, 2021
3c2394a
Add comments to changed code
dordsor21 Dec 29, 2021
0d79d08
Rename worldedit to fawe where appropriate
dordsor21 Dec 29, 2021
e2a1721
Use new language features
dordsor21 Dec 29, 2021
19de815
chore: Format our loggers properly
NotMyFault Dec 29, 2021
e5cbdec
Remove unneeded comments
dordsor21 Dec 29, 2021
ca5640e
Replace CachedChange class with record
dordsor21 Dec 29, 2021
3a31430
Remove/add some more comments
dordsor21 Dec 29, 2021
fd3619f
Merge branch 'major/2.0.0/1.18' of github.com:IntellectualSites/FastA…
dordsor21 Dec 29, 2021
867b28d
Remove remaining keywords frm CachedChanged. IJ doesn't warn?
dordsor21 Dec 29, 2021
8d565b9
Compress switch statements a bit using enhanced
dordsor21 Dec 29, 2021
f505828
More enhanced switches
dordsor21 Dec 29, 2021
9e8f0e7
Refactor: getVersionMin/MaxY -> versionMin/MaxY
dordsor21 Dec 29, 2021
52fa445
Throw, catch, and rethrow our own exception to make sure we're findin…
dordsor21 Dec 29, 2021
235d036
Don't wrap Exception thrown upon invalid schematic path inside a Runt…
dordsor21 Dec 29, 2021
122cba6
docs: Put `since` annotation on newly introduced API
NotMyFault Dec 29, 2021
aaad86c
docs: Drop clarified todos
NotMyFault Dec 29, 2021
9faacb3
Warn user if using small-edit history setting with extended world hei…
dordsor21 Dec 30, 2021
f30ea96
Refactor: add javadoc to Clipboard#create and improve variables when …
dordsor21 Dec 30, 2021
0994ea1
Fix issue with offset/origin when pasting a clipboard via API without…
dordsor21 Dec 30, 2021
42d6466
build: Remove drop our maven repository
NotMyFault Dec 31, 2021
7e96853
docs: Fix deprecation tag
NotMyFault Jan 1, 2022
42dacfc
Fix incorrect toNative method in 1.17 adapter
dordsor21 Jan 4, 2022
b8399ab
refactor: Deprecate tick limiter API for public use
NotMyFault Jan 4, 2022
30c2597
ci: dordsor does love rebasing here too
NotMyFault Jan 4, 2022
631fd3c
docs: Document annotations
NotMyFault Jan 4, 2022
ef686af
Update upstream
NotMyFault Jan 4, 2022
f4658cc
docs: Document a few undocumented annotations
NotMyFault Jan 4, 2022
c27a34c
feat: Add worldedit.schematic.list.other permission and functionality…
Owen1212055 Jan 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ body:
attributes:
label: Fawe Version
description: What version of Fawe are you running? (`/version FastAsyncWorldEdit`)
placeholder: "For example: FastAsyncWorldEdit version 1.17-89;8c01959"
placeholder: "For example: FastAsyncWorldEdit version 2.0.0-SNAPSHOT-1"
validations:
required: true

Expand Down
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
daysUntilStale: 60
daysUntilStale: 30
daysUntilClose: 7
only: issues
exemptLabels:
Expand Down
63 changes: 38 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
name: "build"
name: build

on: ["pull_request", "push"]
on: [pull_request, push]

jobs:
build:
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v2.3.4"
- name : "Validate Gradle Wrapper"
uses : "gradle/wrapper-validation-action@v1.0.4"
- name: "Grab SHA"
uses: "benjlevesque/short-sha@v1.2"
id: "short-sha"
- name: Checkout Repository
uses: actions/checkout@v2.4.0
- name : Validate Gradle Wrapper
uses : gradle/wrapper-validation-action@v1.0.4
- name: Setup Java
uses: actions/setup-java@v2.4.0
with:
length: "7"
- name: "Echo SHA"
run: "echo $SHA"
distribution: temurin
cache: gradle
java-version: 17
- name: Clean Build
run: ./gradlew clean build --no-daemon
- name: Determine release status
if: ${{ runner.os == 'Linux' }}
run: |
if [ "$(./gradlew properties | awk '/^version:/ { print $2; }' | grep '\-SNAPSHOT')" ]; then
echo "STATUS=snapshot" >> $GITHUB_ENV
else
echo "STATUS=release" >> $GITHUB_ENV
fi
- name: Publish Release
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/major/2.0.0/1.18'}}
run: ./gradlew publishToSonatype closeSonatypeStagingRepository
env:
SHA: "${{ steps.short-sha.outputs.sha }}"
- name: "Setup Java"
uses: "actions/setup-java@v2.3.1"
with:
distribution: "temurin"
cache: 'gradle'
java-version: "17"
- name: "Clean Build"
run: "./gradlew clean build --no-daemon"
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
- name: Publish Snapshot
if: ${{ runner.os == 'Linux' && env.STATUS != 'release' && github.event_name == 'push' && github.ref == 'refs/heads/major/2.0.0/1.18' }}
run: ./gradlew publishToSonatype
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
- name: Archive Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v2.3.1
with:
name: FastAsyncWorldEdit-Bukkit-1.17-${{ env.SHA }}
path: worldedit-bukkit/build/libs/FastAsyncWorldEdit-Bukkit-1.17-${{ env.SHA }}.jar
name: FastAsyncWorldEdit-Bukkit-SNAPSHOT
path: worldedit-bukkit/build/libs/FastAsyncWorldEdit-Bukkit-*.jar
20 changes: 20 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Rebase Pull Request
on:
issue_comment:
types: [created]

jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'MEMBER'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2.4.0
with:
token: ${{ secrets.REBASE_TOKEN }}
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.5
env:
GITHUB_TOKEN: ${{ secrets.REBASE_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: "draft release"
name: draft release

on:
push:
branches:
- "2.0.0"
- main

jobs:
update_release_draft:
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest
steps:
- uses: "release-drafter/release-drafter@v5.15.0"
- uses: release-drafter/release-drafter@v5.15.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54 changes: 54 additions & 0 deletions Annotation-Explanation.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
:toc:
:toclevels: 2

= Fawe annotations explained

If we have modified parts of the WorldEdit codebase, we considered annotating it with different styles of comments, which
are explained in this document.

== In-line annotations

[source,java]
-----------------
public static Player adapt(com.sk89q.worldedit.entity.Player player) {
//FAWE start - Get player from PlayerProxy instead of BukkitPlayer if null
player = PlayerProxy.unwrap(player);
return player == null ? null : ((BukkitPlayer) player).getPlayer();
//FAWE end
}
-----------------
The `-sources` jar retains comments, if you add the FAWE API to your maven or gradle project, you can view differences between the projects with ease.
Behind the `//FAWE start - ` you can find a comment what has been changed and why it has been changed.

== Block annotations

[source,java]
-----------------
//FAWE start
@Override
public void setPermission(String permission, boolean value) {
}
//FAWE end
-----------------
Annotations can cover whole methods or go beyond the method and wrap around several added methods.

== Package annotations
Class additions are added under the `com.fastasyncworldedit` namespace, but sometimes classes need to be added in package private.
If that is done, you can find a `package-info.java` file within the package affected that outlines FAWE added classes:
[source,java]
-----------------
/**
* The following classes are FAWE additions:
*
* @see com.sk89q.worldedit.world.block.BlockTypesCache
*/
package com.sk89q.worldedit.world.block;
-----------------

== Undocumented annotations
Specific changes are not annotated:

* `com.fastasyncworldedit.core.configuration.Caption` in `com.sk89q.worldedit` packages have been changed from
`com.sk89q.worldedit.util.formatting.text.Text` to allow the usage of color codes for messages.

* Certain Log4J loggers have been adjusted to use the proper format of placeholders.
12 changes: 4 additions & 8 deletions COMPILING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Compiling
=========

You can compile FastAsyncWorldEdit as long as you have some version of Java greater than or equal to 16 installed. Gradle will download JDK 16 specifically if needed,
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,
but it needs some version of Java to bootstrap from.

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 16.

You can get the JDK 16 [here](https://adoptium.net/).
You can get the JDK 17 [here](https://adoptium.net/).

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

Expand All @@ -16,10 +16,6 @@ The build process uses Gradle, which you do *not* need to download. FastAsyncWor

## To compile...

### NMS
FastAsyncWorldEdit uses NMS (net.minecraft.server) code in a variety of spots. NMS is not distributed via maven and therefore FastAsyncWorldEdit may not build without errors if you didn't install it into your local repository beforehand.
You can do that by either running Spigot's [BuildTools](https://www.spigotmc.org/wiki/buildtools/) targeting the versions needed or using Paper's [paperclip](https://papermc.io/downloads) with `java -Dpaperclip.install=true -jar paperclip.jar`.

### On Windows

1. Shift + right-click the folder with FastAsyncWorldEdit's files and click "Open command prompt".
Expand All @@ -38,13 +34,13 @@ You will find:
* FastAsyncWorldEdit for Bukkit in **worldedit-bukkit/build/libs**
* the CLI version in **worldedit-cli/build/libs**

If you want to use FastAsyncWorldEdit, use the `FastAsyncWorldEdit-1.17-<commitHash>` version obtained in **worldedit-bukkit/build/libs**.
If you want to use FastAsyncWorldEdit, use the `FastAsyncWorldEdit-<identifier>` version obtained in **worldedit-bukkit/build/libs**.

(The `-#` version includes FastAsyncWorldEdit + necessary libraries.)

## Other commands

* `gradlew idea` will generate an [IntelliJ IDEA](http://www.jetbrains.com/idea/) module for each folder.
* `gradlew idea` will generate an [IntelliJ IDEA](https://www.jetbrains.com/idea/) module for each folder.

_Possibly broken_:
* `gradlew eclipse` will generate an [Eclipse](https://www.eclipse.org/downloads/) project for each folder.
Expand Down
10 changes: 0 additions & 10 deletions Jenkinsfile

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ FastAsyncWorldEdit is a fork of WorldEdit that has huge speed and memory improve
* Use it in creative, survival in single player or on your server.
* Use it on your Minecraft server to fix grieving and mistakes.

Java Edition required. FastAsyncWorldEdit is compatible with Bukkit, Spigot, Paper, and Tuinity.
Java Edition required. FastAsyncWorldEdit is compatible with Bukkit, Spigot and Paper.

## Download FastAsyncWorldEdit
* Spigot: https://www.spigotmc.org/resources/fast-async-worldedit.13932/
Expand All @@ -24,8 +24,8 @@ Java Edition required. FastAsyncWorldEdit is compatible with Bukkit, Spigot, Pap
* [Wiki](https://github.com/IntellectualSites/FastAsyncWorldEdit-Documentation/wiki)
* [Report Issue](https://github.com/IntellectualSites/FastAsyncWorldEdit/issues)
* [Crowdin (Translations)](https://intellectualsites.crowdin.com/fastasyncworldedit)
* [JavaDocs for the -bukkit module](https://ci.athion.net/job/FastAsyncWorldEdit-1.17-Bukkit-Javadocs/javadoc/)
* [JavaDocs for the -core module](https://ci.athion.net/job/FastAsyncWorldEdit-1.17-Core-Javadocs/javadoc/)
* [JavaDocs for the -bukkit module](https://javadoc.io/doc/com.fastasyncworldedit/FastAsyncWorldEdit-Bukkit/latest/index.html)
* [JavaDocs for the -core module](https://javadoc.io/doc/com.fastasyncworldedit/FastAsyncWorldEdit-Core/latest/index.html)

## Edit The Code

Expand Down
22 changes: 18 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import org.ajoberstar.grgit.Grgit
import java.time.format.DateTimeFormatter
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import java.net.URI

plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}

logger.lifecycle("""
*******************************************
Expand All @@ -17,7 +22,8 @@ logger.lifecycle("""
*******************************************
""")

var rootVersion by extra("1.17")
var rootVersion by extra("2.0.0")
var snapshot by extra("SNAPSHOT")
var revision: String by extra("")
var buildNumber by extra("")
var date: String by extra("")
Expand All @@ -27,11 +33,10 @@ ext {
}
date = git.head().dateTime.format(DateTimeFormatter.ofPattern("yy.MM.dd"))
revision = "-${git.head().abbreviatedId}"
val commit: String? = git.head().abbreviatedId
buildNumber = if (project.hasProperty("buildnumber")) {
project.properties["buildnumber"] as String
snapshot + "-" + project.properties["buildnumber"] as String
} else {
commit.toString()
project.properties["snapshot"] as String
}
}

Expand Down Expand Up @@ -66,3 +71,12 @@ allprojects {
}

applyCommonConfiguration()

nexusPublishing {
repositories {
sonatype {
nexusUrl.set(URI.create("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
19 changes: 14 additions & 5 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ plugins {
repositories {
mavenCentral()
gradlePluginPortal()
maven {
name = "PaperMC"
url = uri("https://papermc.io/repo/repository/maven-public/")
}
maven {
name = "EngineHub"
url = uri("https://maven.enginehub.org/repo/")
}
maven {
name = "PaperMC"
url = uri("https://papermc.io/repo/repository/maven-public/")
content {
includeGroupByRegex("io\\.papermc\\..*")
}
}
}

val properties = Properties().also { props ->
Expand All @@ -28,5 +31,11 @@ dependencies {
implementation(gradleApi())
implementation("org.ajoberstar.grgit:grgit-gradle:4.1.1")
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.1")
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.1.14")
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.3.3")
}

kotlin {
jvmToolchain {
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(17))
}
}
5 changes: 1 addition & 4 deletions buildSrc/src/main/kotlin/AdapterConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import org.gradle.kotlin.dsl.dependencies

// For specific version pinning, see
// https://papermc.io/repo/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
fun Project.applyPaperweightAdapterConfiguration(
paperVersion: String
) {
fun Project.applyPaperweightAdapterConfiguration() {
applyCommonConfiguration()
apply(plugin = "java-library")
applyCommonJavaConfiguration(
Expand All @@ -17,7 +15,6 @@ fun Project.applyPaperweightAdapterConfiguration(
apply(plugin = "io.papermc.paperweight.userdev")

dependencies {
paperDevBundle(paperVersion)
"implementation"(project(":worldedit-bukkit"))
}

Expand Down
Loading