Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-14 23:20:06 +01:00
Update so many dependencies, merge Forge/Fabric for final jar (#1651)
* Update so many dependencies, merge Forge/Fabric for final * Clean up contrib docs for Gradle change * Fix setting compat flags while using toolchain * Fix deprecation in doc printer * Restore proper forge JAR name * Add dist classifier for mod jar * Properly relocate new bStats * Fix jar used from fabric * Fix fabric bom * Dup the shaded classes for consistency * Sync Forge/Fabric log4j versions, de-dup * Downgrade both log4j. This will work * Update some plugins as well * Drop the fabric force stuff * Use duplicate strategy to directly merge jar
Dieser Commit ist enthalten in:
Ursprung
f3d4621589
Commit
8b1f043dc5
@ -1,9 +1,8 @@
|
||||
Compiling
|
||||
=========
|
||||
|
||||
You can compile FastAsyncWorldEdit as long as you have the [Java Development Kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html) for Java 8.
|
||||
Newer versions of the JDK may not compile.
|
||||
You only need one version of the JDK installed.
|
||||
You can compile FastAsyncWorldEdit as long as you have some version of Java greater than or equal to 8 installed. Gradle will download JDK 8 specifically if needed,
|
||||
but it needs some version of Java to bootstrap from.
|
||||
|
||||
The build process uses Gradle, which you do *not* need to download. FastAsyncWorldEdit is a multi-module project with two active modules:
|
||||
|
||||
@ -29,7 +28,7 @@ You will find:
|
||||
* The core FastAsyncWorldEdit API in **worldedit-core/build/libs**
|
||||
* FastAsyncWorldEdit for Bukkit in **worldedit-bukkit/build/libs***
|
||||
|
||||
If you want to use FastAsyncWorldEdit, use the `FastAsyncWorldEdit-1.15-#` version.
|
||||
If you want to use FastAsyncWorldEdit, use the `FastAsyncWorldEdit-1.16-#` version.
|
||||
|
||||
## Other commands
|
||||
|
||||
|
40
README.md
40
README.md
@ -6,7 +6,22 @@
|
||||
|
||||
FAWE is a fork of WorldEdit that has huge speed and memory improvements and considerably more features
|
||||
|
||||
## Links
|
||||
**A Minecraft Map Editor... that runs in-game!**
|
||||
|
||||
* With selections, schematics, copy and paste, brushes, and scripting!
|
||||
* 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. WorldEdit is compatible with Forge, Fabric, Bukkit, Spigot, Paper, and Sponge.
|
||||
|
||||
## Download FastAsyncWorldEdit
|
||||
### 1.15+
|
||||
* [Download](https://www.spigotmc.org/resources/fast-async-worldedit.13932/)
|
||||
* [Jenkins](https://ci.athion.net/job/FastAsyncWorldEdit-1.16/)
|
||||
|
||||
Looking builds for older versions? Download them [here](https://intellectualsites.github.io/download/).
|
||||
|
||||
## Links
|
||||
|
||||
* [Spigot Page](https://www.spigotmc.org/threads/fast-async-worldedit.100104/)
|
||||
* [Discord](https://discord.gg/KxkjDVg)
|
||||
@ -15,13 +30,26 @@ FAWE is a fork of WorldEdit that has huge speed and memory improvements and cons
|
||||
* [Crowdin](https://intellectualsites.crowdin.com/fastasyncworldedit)
|
||||
* [JavaDocs](https://ci.athion.net/job/FastAsyncWorldEdit-1.16/javadoc/)
|
||||
|
||||
## Downloads
|
||||
### 1.15+
|
||||
* [Download](https://www.spigotmc.org/resources/fast-async-worldedit.13932/)
|
||||
* [Jenkins](https://ci.athion.net/job/FastAsyncWorldEdit-1.16/)
|
||||
Edit the Code
|
||||
---------
|
||||
|
||||
Looking builds for older versions? Download them [here](https://intellectualsites.github.io/download/).
|
||||
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 8.
|
||||
* Note that if you do _not_ install JDK 8 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`
|
||||
* Windows - Command Prompt: `gradlew :worldedit-fabric:runClient`
|
||||
* Windows - PowerShell: `.\gradlew :worldedit-fabric:runClient`
|
||||
|
||||
🎉 That's it. 🎉 It takes a long time to actually transform WorldEdit into a mod. If it succeeds, **the Minecraft game will open and you can create a single player world with WorldEdit**.
|
||||
|
||||
---
|
||||
|
||||
For additional information about compiling WorldEdit, see [COMPILING.md](COMPILING.md).
|
||||
FAWE is a fork of WorldEdit that has huge speed and memory improvements and considerably more features
|
||||
|
||||
## Building
|
||||
FAWE uses gradle to build
|
||||
|
@ -1,5 +1,9 @@
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.JavaPluginExtension
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.repositories
|
||||
import org.gradle.kotlin.dsl.the
|
||||
|
||||
fun Project.applyCommonConfiguration() {
|
||||
group = rootProject.group
|
||||
@ -50,4 +54,29 @@ fun Project.applyCommonConfiguration() {
|
||||
cacheChangingModulesFor(5, "MINUTES")
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withId("java") {
|
||||
the<JavaPluginExtension>().toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(8))
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
constraints {
|
||||
for (conf in configurations.names) {
|
||||
add(conf, "com.google.guava:guava") {
|
||||
version { strictly(Versions.GUAVA) }
|
||||
because("Mojang provides Guava")
|
||||
}
|
||||
add(conf, "com.google.code.gson:gson") {
|
||||
version { strictly(Versions.GSON) }
|
||||
because("Mojang provides Gson")
|
||||
}
|
||||
add(conf, "it.unimi.dsi:fastutil") {
|
||||
version { strictly(Versions.FAST_UTIL) }
|
||||
because("Mojang provides FastUtil")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +116,7 @@ fun Project.applyShadowConfiguration() {
|
||||
include(project(":worldedit-libs:core"))
|
||||
include(project(":worldedit-libs:${project.name.replace("worldedit-", "")}"))
|
||||
include(project(":worldedit-core"))
|
||||
exclude("com.google.code.findbugs:jsr305")
|
||||
}
|
||||
archiveFileName.set("FastAsyncWorldEdit-${project.version}.jar")
|
||||
exclude("GradleStart**")
|
||||
|
@ -1,6 +1,19 @@
|
||||
/*
|
||||
import org.gradle.api.Project
|
||||
|
||||
object Versions {
|
||||
const val TEXT = "3.0.4"
|
||||
const val TEXT_EXTRAS = "3.0.6"
|
||||
const val PISTON = "0.5.6"
|
||||
const val AUTO_VALUE = "1.7.4"
|
||||
const val JUNIT = "5.7.0"
|
||||
const val MOCKITO = "3.7.7"
|
||||
const val SLF4J = "1.7.30"
|
||||
const val LOGBACK = "1.2.3"
|
||||
const val FAST_UTIL = "8.2.1"
|
||||
const val GUAVA = "21.0"
|
||||
const val GSON = "2.8.0"
|
||||
}
|
||||
|
||||
// Properties that need a project reference to resolve:
|
||||
class ProjectVersions(project: Project) {
|
||||
val loom = project.rootProject.property("loom.version")
|
||||
@ -9,5 +22,3 @@ class ProjectVersions(project: Project) {
|
||||
|
||||
val Project.versions
|
||||
get() = ProjectVersions(this)
|
||||
|
||||
*/
|
||||
|
@ -8,5 +8,5 @@ org.gradle.parallel=true
|
||||
org.gradle.caching=true
|
||||
org.gradle.vfs.watch=true
|
||||
|
||||
loom.version=0.2.6-20200124.104118-60
|
||||
mixin.version=0.8+build.17
|
||||
loom.version=0.5.43
|
||||
mixin.version=0.8.1+build.21
|
||||
|
@ -6,6 +6,7 @@ listOf("bukkit", "core").forEach {
|
||||
include("worldedit-libs:$it")
|
||||
include("worldedit-$it")
|
||||
}
|
||||
include("worldedit-mod")
|
||||
include("worldedit-libs:core:ap")
|
||||
|
||||
dependencyResolutionManagement {
|
||||
|
@ -9,11 +9,12 @@ applyShadowConfiguration()
|
||||
|
||||
dependencies {
|
||||
"api"(project(":worldedit-core"))
|
||||
"implementation"("org.apache.logging.log4j:log4j-core:2.8.1")
|
||||
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
||||
"implementation"(platform("org.apache.logging.log4j:log4j-bom:2.14.0"))
|
||||
"implementation"("org.apache.logging.log4j:log4j-core")
|
||||
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
"implementation"("commons-cli:commons-cli:1.4")
|
||||
"implementation"("com.google.guava:guava:21.0")
|
||||
"implementation"("com.google.code.gson:gson:2.8.6")
|
||||
"implementation"("com.google.guava:guava")
|
||||
"implementation"("com.google.code.gson:gson")
|
||||
}
|
||||
|
||||
tasks.named<Jar>("jar") {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.4.0"
|
||||
kotlin("jvm") version "1.4.21"
|
||||
application
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
application.mainClassName = "com.sk89q.worldedit.internal.util.DocumentationPrinter"
|
||||
application.mainClass.set("com.sk89q.worldedit.internal.util.DocumentationPrinter")
|
||||
tasks.named<JavaExec>("run") {
|
||||
workingDir = rootProject.projectDir
|
||||
}
|
||||
@ -21,5 +21,5 @@ dependencies {
|
||||
"implementation"(project(":worldedit-core"))
|
||||
"implementation"(kotlin("stdlib-jdk8"))
|
||||
"implementation"(kotlin("reflect"))
|
||||
"implementation"("com.google.guava:guava:21.0")
|
||||
"implementation"("com.google.guava:guava")
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ class DocumentationPrinter private constructor() {
|
||||
}
|
||||
|
||||
private fun writeHeader() {
|
||||
cmdOutput.appendln("""
|
||||
cmdOutput.appendLine("""
|
||||
========
|
||||
Commands
|
||||
========
|
||||
@ -166,7 +166,7 @@ Commands
|
||||
You can access a command listing in-game via the ``//help`` command.
|
||||
""".trim())
|
||||
|
||||
permsOutput.appendln("""
|
||||
permsOutput.appendLine("""
|
||||
===========
|
||||
Permissions
|
||||
===========
|
||||
@ -184,11 +184,11 @@ See the :doc:`commands` page for an explanation of some of these commands.
|
||||
:header: Command, Permission
|
||||
:widths: 15, 25
|
||||
""".trim())
|
||||
permsOutput.appendln()
|
||||
permsOutput.appendLine()
|
||||
}
|
||||
|
||||
private fun writeFooter() {
|
||||
permsOutput.appendln()
|
||||
permsOutput.appendLine()
|
||||
permsOutput.append("""
|
||||
Other Permissions
|
||||
==================
|
||||
@ -254,10 +254,10 @@ Other Permissions
|
||||
val name = prefix + command.name
|
||||
val entries = commandTableEntries(command, parents)
|
||||
|
||||
cmdOutput.appendln(".. raw:: html")
|
||||
cmdOutput.appendln()
|
||||
cmdOutput.appendln(""" <span id="command-${linkSafe(name)}"></span>""")
|
||||
cmdOutput.appendln()
|
||||
cmdOutput.appendLine(".. raw:: html")
|
||||
cmdOutput.appendLine()
|
||||
cmdOutput.appendLine(""" <span id="command-${linkSafe(name)}"></span>""")
|
||||
cmdOutput.appendLine()
|
||||
cmdOutput.append(".. topic:: ``$name``")
|
||||
if (!command.aliases.isEmpty()) {
|
||||
command.aliases.joinTo(cmdOutput, ", ",
|
||||
@ -265,19 +265,19 @@ Other Permissions
|
||||
postfix = ")",
|
||||
transform = { "``$prefix$it``" })
|
||||
}
|
||||
cmdOutput.appendln()
|
||||
cmdOutput.appendln(" :class: command-topic").appendln()
|
||||
cmdOutput.appendLine()
|
||||
cmdOutput.appendLine(" :class: command-topic").appendLine()
|
||||
CommandUtil.deprecationWarning(command).ifPresent { warning ->
|
||||
cmdOutput.appendln("""
|
||||
cmdOutput.appendLine("""
|
||||
| .. WARNING::
|
||||
| ${reduceToRst(warning).makeRstSafe("\n\n")}
|
||||
""".trimMargin())
|
||||
}
|
||||
cmdOutput.appendln("""
|
||||
cmdOutput.appendLine("""
|
||||
| .. csv-table::
|
||||
| :widths: 8, 15
|
||||
""".trimMargin())
|
||||
cmdOutput.appendln()
|
||||
cmdOutput.appendLine()
|
||||
for ((k, v) in entries) {
|
||||
val rstSafe = v.makeRstSafe("\n")
|
||||
cmdOutput.append(" ".repeat(2))
|
||||
@ -285,9 +285,9 @@ Other Permissions
|
||||
.append(",")
|
||||
.append('"')
|
||||
.append(rstSafe)
|
||||
.append('"').appendln()
|
||||
.append('"').appendLine()
|
||||
}
|
||||
cmdOutput.appendln()
|
||||
cmdOutput.appendLine()
|
||||
}
|
||||
|
||||
private fun String.makeRstSafe(lineJoiner: String) = trim()
|
||||
|
@ -18,8 +18,11 @@ configurations.all {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
"compile"(project(":worldedit-core"))
|
||||
"compile"("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
|
||||
"api"(project(":worldedit-core"))
|
||||
"implementation"(enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.8.1") {
|
||||
because("Mojang provides Log4J, we bump to match Forge")
|
||||
})
|
||||
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
|
||||
"minecraft"("com.mojang:minecraft:$minecraftVersion")
|
||||
"mappings"("net.fabricmc:yarn:$yarnMappings")
|
||||
@ -73,7 +76,7 @@ tasks.named<ShadowJar>("shadowJar") {
|
||||
archiveClassifier.set("dist-dev")
|
||||
dependencies {
|
||||
relocate("org.slf4j", "com.sk89q.worldedit.slf4j")
|
||||
relocate("org.apache.logging.slf4j", "com.sk89q.worldedit.log4jbridge")
|
||||
relocate("org.apache.logging.slf4j", "com.sk89q.worldedit.l4j")
|
||||
relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4")
|
||||
|
||||
include(dependency("org.slf4j:slf4j-api"))
|
||||
|
@ -27,7 +27,10 @@ configurations.all {
|
||||
|
||||
dependencies {
|
||||
"api"(project(":worldedit-core"))
|
||||
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl:2.11.2")
|
||||
"implementation"(enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.8.1") {
|
||||
because("Forge provides Log4J (Mojang provides a lower version, but Forge bumps)")
|
||||
})
|
||||
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl")
|
||||
|
||||
"minecraft"("net.minecraftforge:forge:$minecraftVersion-$forgeVersion")
|
||||
}
|
||||
@ -93,7 +96,7 @@ addJarManifest(includeClasspath = false)
|
||||
tasks.named<ShadowJar>("shadowJar") {
|
||||
dependencies {
|
||||
relocate("org.slf4j", "com.sk89q.worldedit.slf4j")
|
||||
relocate("org.apache.logging.slf4j", "com.sk89q.worldedit.log4jbridge")
|
||||
relocate("org.apache.logging.slf4j", "com.sk89q.worldedit.l4j")
|
||||
relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4")
|
||||
|
||||
include(dependency("org.slf4j:slf4j-api"))
|
||||
|
2
worldedit-mod/README.md
Normale Datei
2
worldedit-mod/README.md
Normale Datei
@ -0,0 +1,2 @@
|
||||
This folder is for the merged output of Fabric and Forge jars. This allows us to distribute
|
||||
both variants of the mod in a single file to avoid end-user confusion.
|
24
worldedit-mod/build.gradle.kts
Normale Datei
24
worldedit-mod/build.gradle.kts
Normale Datei
@ -0,0 +1,24 @@
|
||||
import net.fabricmc.loom.task.RemapJarTask
|
||||
|
||||
plugins {
|
||||
base
|
||||
}
|
||||
|
||||
applyCommonConfiguration()
|
||||
|
||||
tasks.register<Jar>("jar") {
|
||||
val remapFabric = project(":worldedit-fabric").tasks.named<RemapJarTask>("remapShadowJar")
|
||||
dependsOn(
|
||||
remapFabric,
|
||||
project(":worldedit-forge").tasks.named("reobfShadowJar")
|
||||
)
|
||||
from(zipTree({remapFabric.get().archiveFile}))
|
||||
from(zipTree({project(":worldedit-forge").tasks.getByName("shadowJar").outputs.files.singleFile}))
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
archiveClassifier.set("dist")
|
||||
}
|
||||
|
||||
tasks.named("assemble") {
|
||||
dependsOn("jar")
|
||||
}
|
@ -1,28 +1,28 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
plugins {
|
||||
id("org.spongepowered.plugin")
|
||||
id("org.spongepowered.gradle.plugin")
|
||||
}
|
||||
|
||||
applyPlatformAndCoreConfiguration()
|
||||
applyShadowConfiguration()
|
||||
|
||||
// I can't believe sponge sets this in a base plugin with no opt-out
|
||||
convention.getPlugin(JavaPluginConvention::class.java).apply {
|
||||
setSourceCompatibility(null)
|
||||
setTargetCompatibility(null)
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":worldedit-core"))
|
||||
compile(project(":worldedit-libs:sponge"))
|
||||
compile("org.spongepowered:spongeapi:7.1.0")
|
||||
compile("org.bstats:bstats-sponge:1.5")
|
||||
testCompile("org.mockito:mockito-core:1.9.0-rc1")
|
||||
}
|
||||
|
||||
sponge {
|
||||
plugin {
|
||||
id = "worldedit"
|
||||
}
|
||||
api(project(":worldedit-core"))
|
||||
api(project(":worldedit-libs:sponge"))
|
||||
api("org.spongepowered:spongeapi:7.1.0")
|
||||
api("org.bstats:bstats-sponge:1.7")
|
||||
testImplementation("org.mockito:mockito-core:1.9.0-rc1")
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren