mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@e3aca921 Replace ConcurrentUtil's Validate with Objects PaperMC/Paper@9a626dd7 Rewrite ticket counter system PaperMC/Paper@65250cbe Drop "Optimize Collision to not load chunks" PaperMC/Paper@55d56d91 Apply "Flush regionfiles on save configuration option" PaperMC/Paper@920e8d35 Apply "Optimise collision checking in player move packet handling" PaperMC/Paper@ec492d3f Apply "Improve keepalive ping system" PaperMC/Paper@8f659478 Apply "Optimise EntityScheduler ticking" PaperMC/Paper@086b4fd4 Apply "Optional per player mob spawns" PaperMC/Paper@2f4211ed Apply "Improve cancelling PreCreatureSpawnEvent with per player mob spawns" PaperMC/Paper@b6d95574 Apply "Optimize Hoppers" PaperMC/Paper@388e6936 update generator PaperMC/Paper@a3c89a8f add javadocs for new api PaperMC/Paper@fcc763ad Call BlockRedstoneEvent for the shelf PaperMC/Paper@03eb18bb replace requireNonNull by checkArgument and deprecate MCUtil#toLocation PaperMC/Paper@6b7bf014 bump built-in datapack version PaperMC/Paper@2779a538 deprecate #lanterns material tag in favour of vanilla tag PaperMC/Paper@6f9957e8 Mannequin#createDefaultProfile -> Mannequin#defaultProfile PaperMC/Paper@24874e53 Also rename Mannequin profile getter/setters for consistency PaperMC/Paper@bc2ae107 Fix default respawn dimension being null for new worlds PaperMC/Paper@eb421583 Use 0.0.4 release of ConcurrentUtil PaperMC/Paper@bb017458 1.21.9-pre2 PaperMC/Paper@02492043 1.21.9-pre2 feature patches PaperMC/Paper@9360ba42 Identifying comments for MinecraftServer PaperMC/Paper@5d3aa537 Some diff improvements in prepare spawn task PaperMC/Paper@22ad4519 Move some stuff to ATs PaperMC/Paper@0ea15c97 Drop no longer applicable ATs PaperMC/Paper@cf78f2a2 bump api-version/datapack format and add a copper torch tag PaperMC/Paper@60cb0dfc generate ClientOption enums and mark CraftBlockData impl as null marked PaperMC/Paper@40252892 Add pre2 to api version PaperMC/Paper@f2cb073a Set build channel to alpha PaperMC/Paper@90b29c4c Port most of the anti-xray patch PaperMC/Paper@4a8e88dc Disable oldPaperCommit to fix CI build PaperMC/Paper@121ac2eb Port the last Anti-XRay hunk PaperMC/Paper@f43641f8 Use ConcurrentUtil 0.0.5 PaperMC/Paper@1f79388d fix end portal teleportation PaperMC/Paper@2efb400a [ci/skip] Adjust spawn location event docs PaperMC/Paper@cb9fc05d simplify overloads PaperMC/Paper@25ecc590 Enable Anti-Xray PaperMC/Paper@4d7185f6 Add AsyncPlayerSpawnLocationEvent#isNewPlayer (#13081) PaperMC/Paper@dc474a89 Fixup vanilla code for Anti-Xray changes PaperMC/Paper@0e23b024 Add back null check for chunkPacketBlockController
157 lines
5.6 KiB
Diff
157 lines
5.6 KiB
Diff
--- a/paper-server/build.gradle.kts
|
|
+++ b/paper-server/build.gradle.kts
|
|
@@ -5,6 +_,7 @@
|
|
import paper.libs.com.google.gson.annotations.SerializedName
|
|
import java.time.Instant
|
|
import kotlin.io.path.readText
|
|
+import kotlin.io.path.writeText
|
|
|
|
plugins {
|
|
`java-library`
|
|
@@ -26,6 +_,18 @@
|
|
minecraftVersion = providers.gradleProperty("mcVersion")
|
|
gitFilePatches = false
|
|
|
|
+ // Purpur start - Rebrand
|
|
+ val purpur = forks.register("purpur") {
|
|
+ upstream.patchDir("paperServer") {
|
|
+ upstreamPath = "paper-server"
|
|
+ excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
|
|
+ patchesDir = rootDirectory.dir("purpur-server/paper-patches")
|
|
+ outputDir = rootDirectory.dir("paper-server")
|
|
+ }
|
|
+ }
|
|
+ activeFork = purpur
|
|
+ // Purpur end - Rebrand
|
|
+
|
|
spigot {
|
|
enabled = false
|
|
buildDataRef = "436eac9815c211be1a2a6ca0702615f995e81c44"
|
|
@@ -107,7 +_,21 @@
|
|
}
|
|
}
|
|
|
|
-val log4jPlugins = sourceSets.create("log4jPlugins")
|
|
+// Purpur start - Rebrand
|
|
+sourceSets {
|
|
+ main {
|
|
+ java { srcDir("../paper-server/src/main/java") }
|
|
+ resources { srcDir("../paper-server/src/main/resources") }
|
|
+ }
|
|
+ test {
|
|
+ java { srcDir("../paper-server/src/test/java") }
|
|
+ resources { srcDir("../paper-server/src/test/resources") }
|
|
+ }
|
|
+}
|
|
+val log4jPlugins = sourceSets.create("log4jPlugins") {
|
|
+ java { srcDir("../paper-server/src/log4jPlugins/java") }
|
|
+}
|
|
+// Purpur end - Rebrand
|
|
configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
|
extendsFrom(configurations.compileClasspath.get())
|
|
}
|
|
@@ -129,7 +_,7 @@
|
|
}
|
|
|
|
dependencies {
|
|
- implementation(project(":paper-api"))
|
|
+ implementation(project(":purpur-api")) // Purpur
|
|
implementation("ca.spottedleaf:concurrentutil:0.0.5")
|
|
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
|
|
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
|
|
@@ -157,6 +_,10 @@
|
|
implementation("org.ow2.asm:asm-commons:9.8")
|
|
implementation("org.spongepowered:configurate-yaml:4.2.0")
|
|
|
|
+ implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur
|
|
+ implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
|
|
+ implementation("dev.omega24:upnp4j:1.0") // Purpur
|
|
+
|
|
// Deps that were previously in the API but have now been moved here for backwards compat, eventually to be removed
|
|
runtimeOnly("commons-lang:commons-lang:2.6")
|
|
runtimeOnly("org.xerial:sqlite-jdbc:3.49.1.0")
|
|
@@ -201,14 +_,14 @@
|
|
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
|
|
attributes(
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
- "Implementation-Title" to "Paper",
|
|
+ "Implementation-Title" to "Purpur", // Purpur
|
|
"Implementation-Version" to implementationVersion,
|
|
"Implementation-Vendor" to date,
|
|
- "Specification-Title" to "Paper",
|
|
+ "Specification-Title" to "Purpur", // Purpur
|
|
"Specification-Version" to project.version,
|
|
- "Specification-Vendor" to "Paper Team",
|
|
- "Brand-Id" to "papermc:paper",
|
|
- "Brand-Name" to "Paper",
|
|
+ "Specification-Vendor" to "Purpur Team", // Purpur
|
|
+ "Brand-Id" to "purpurmc:purpur", // Purpur
|
|
+ "Brand-Name" to "Purpur", // Purpur
|
|
"Build-Number" to (build ?: ""),
|
|
"Build-Time" to buildTime.toString(),
|
|
"Git-Branch" to gitBranch,
|
|
@@ -267,7 +_,7 @@
|
|
jvmArgumentProviders.add(provider)
|
|
}
|
|
|
|
-val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
|
|
+val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("../paper-server/src/generated/java").asFile.toPath() // Purpur
|
|
idea {
|
|
module {
|
|
generatedSourceDirs.add(generatedDir.toFile())
|
|
@@ -359,7 +_,7 @@
|
|
mainClass.set(null as String?)
|
|
}
|
|
|
|
-fill {
|
|
+/* fill { // Purpur - we don't use fill
|
|
project("paper")
|
|
versionFamily(paperweight.minecraftVersion.map { it.split(".", "-").takeWhile { part -> part.toIntOrNull() != null }.take(2).joinToString(".") })
|
|
version(paperweight.minecraftVersion)
|
|
@@ -374,4 +_,44 @@
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
+} */ // Purpur - we don't use fill
|
|
+
|
|
+// tasks.register("rebuildMinecraftSourcesWithGit") {
|
|
+// group = "temp"
|
|
+//
|
|
+// val patchDir = project.rootDir.resolve("purpur-server/minecraft-patches/sources").convertToPath().cleanDir()
|
|
+// val inputDir = this.project.rootDir.resolve("purpur-server/src/minecraft/java").convertToPath()
|
|
+//
|
|
+// val git = Git(inputDir)
|
|
+// git("stash", "push").executeSilently(silenceErr = true)
|
|
+// git("checkout", "file").executeSilently(silenceErr = true)
|
|
+//
|
|
+// rebuildWithGit(git, patchDir)
|
|
+// }
|
|
+//
|
|
+// private fun rebuildWithGit(
|
|
+// git: Git,
|
|
+// patchDir: java.nio.file.Path
|
|
+// ): Int {
|
|
+// val files = git("diff-tree", "--name-only", "--no-commit-id", "-r", "HEAD").getText().split("\n")
|
|
+// files.parallelStream().forEach { filename ->
|
|
+// if (filename.isBlank()) return@forEach
|
|
+// val patch = git(
|
|
+// "format-patch",
|
|
+// "--diff-algorithm=myers",
|
|
+// "--full-index",
|
|
+// "--no-signature",
|
|
+// "--no-stat",
|
|
+// "--no-numbered",
|
|
+// "-1",
|
|
+// "HEAD",
|
|
+// "--stdout",
|
|
+// filename
|
|
+// ).getText()
|
|
+// val patchFile = patchDir.resolve("$filename.patch")
|
|
+// patchFile.createParentDirectories()
|
|
+// patchFile.writeText(patch)
|
|
+// }
|
|
+//
|
|
+// return files.size
|
|
+// }
|