mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-30 20:29:23 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@efdcaa2 Fix removing the "LootTable" nbt tag from Block entities (#11929) PaperMC/Paper@55f3f28 Reimplement ItemStack Obfuscation (#11817) PaperMC/Paper@08fc33c Update CustomTimingsHandler Nag Message (#11923) PaperMC/Paper@5e14504 [ci skip] Add missing deprecated docs for isEnabledByFeature (#11938) PaperMC/Paper@4007171 Correct obfuscation of oversized items (#11944) PaperMC/Paper@1b38f28 Fix reading recipes used on furnace (#11947) PaperMC/Paper@b03d39b [ci skip] Update paperweight to 2.0.0-beta.13 PaperMC/Paper@6316a50 Make CraftServer#isPrimaryThread use TickThread check PaperMC/Paper@ea7b961 Fix MapItem incorectly fetching water biomes on treasure maps (#11936) PaperMC/Paper@b242f1e Prevent day cycle on the client when using fixed time (#11924) PaperMC/Paper@3e42518 Fix snow accumulating in custom biomes without precipitation (#11854) PaperMC/Paper@3d9ecc4 Log thread check parameters when the thread check fails PaperMC/Paper@3ad3fbc Update to Concurrentutil 0.0.3 PaperMC/Paper@79ffcd1 Fix vanilla parity on enchantable items with no targets (#11896) PaperMC/Paper@19ddbef Fix InventoryAction wrong for Bundles (#11902) PaperMC/Paper@ac3aaa2 Don't use delayed registries in impl anywhere (#11918) PaperMC/Paper@775002a [ci skip] Remove nullable from SyncedEntityData#packAll (#11949) PaperMC/Paper@c949225 MenuType API addition InventoryView Builders (#11816) PaperMC/Paper@c2f24e1 Feat: Add 'with' methods to CommandSourceStack (#11868) PaperMC/Paper@ed75b0e Disallow calling JavaPlugin#getCommand during onEnable for Paper plugins (#11914) PaperMC/Paper@08ac057 Rename getPotentialBedLocation to getPotentialRespawnLocation (#11950) PaperMC/Paper@9746d73 Add back known movement check PaperMC/Paper@e5542cf Hide unnecessary decorated pot data (#11957) PaperMC/Paper@eb4db79 Make CommandSourceStack respect hidden players (#11898) PaperMC/Paper@76617dd Add EntityEffectTickEvent (#11838) PaperMC/Paper@86c6308 Fix locate command dist overflow/underflow (#11956) PaperMC/Paper@2ea6aee Deprecate Turtle#isDigging (#11959) PaperMC/Paper@ad74b67 Fix client visual desync if cooldown events are cancelled (#11892) PaperMC/Paper@50c2c59 Fix unstable Suggestion comparison by sorting int suggestions before text ones (#11941) PaperMC/Paper@3709150 Expose all possible block data states (#11958) PaperMC/Paper@5e23d28 Remove entity tag selector tag completion fix (#11964) PaperMC/Paper@ab1b312 Call PlayerItemDamageEvent for tridents (#11899) PaperMC/Paper@1bb3677 Remove deprecation from EntityRemoveEvent (#11961) PaperMC/Paper@d69981b [ci skip] Remove redundant build configuration PaperMC/Paper@6fde26d remove .paperassetsroot PaperMC/Paper@fe75eaf split direct holder support up from ctor accepting Holder PaperMC/Paper@c44f891 Fix PlayerUseUnknownEntityEvent jd (#11969) PaperMC/Paper@85d0040 [ci skip] Fix getTemperature javadocs (#11967) PaperMC/Paper@e82f7e6 [ci skip] Fix Inventory#setMaxStackSize jd (#11968) PaperMC/Paper@9f74858 [ci skip] Cleanup test plugin
175 lines
6.3 KiB
Diff
175 lines
6.3 KiB
Diff
--- a/paper-server/build.gradle.kts
|
|
+++ b/paper-server/build.gradle.kts
|
|
@@ -21,6 +_,23 @@
|
|
// macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java")
|
|
// gitFilePatches = true
|
|
|
|
+ // Gale start - project setup
|
|
+ val gale = forks.register("gale") {
|
|
+ upstream.patchDir("paperServer") {
|
|
+ upstreamPath = "paper-server"
|
|
+ excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
|
|
+ patchesDir = rootDirectory.dir("gale-server/paper-patches")
|
|
+ outputDir = rootDirectory.dir("paper-server")
|
|
+ }
|
|
+ }
|
|
+
|
|
+ activeFork = gale
|
|
+
|
|
+ paper {
|
|
+ paperServerDir = upstreamsDirectory().map { it.dir("paper/paper-server") }
|
|
+ }
|
|
+ // Gale end - project setup
|
|
+
|
|
spigot {
|
|
buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42"
|
|
packageVersion = "v1_21_R3" // also needs to be updated in MappingEnvironment
|
|
@@ -101,7 +_,22 @@
|
|
}
|
|
}
|
|
|
|
-val log4jPlugins = sourceSets.create("log4jPlugins")
|
|
+// Gale start - project setup
|
|
+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") }
|
|
+}
|
|
+// Gale end - project setup
|
|
configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
|
extendsFrom(configurations.compileClasspath.get())
|
|
}
|
|
@@ -119,7 +_,7 @@
|
|
}
|
|
|
|
dependencies {
|
|
- implementation(project(":paper-api"))
|
|
+ implementation(project(":gale-api")) // Gale - project setup - Depend on own API
|
|
implementation("ca.spottedleaf:concurrentutil:0.0.3")
|
|
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
|
|
@@ -176,26 +_,36 @@
|
|
implementation("me.lucko:spark-paper:1.10.119-SNAPSHOT")
|
|
}
|
|
|
|
+// Gale start - hide irrelevant compilation warnings
|
|
+tasks.withType<JavaCompile> {
|
|
+ val compilerArgs = options.compilerArgs
|
|
+ compilerArgs.add("-Xlint:-module")
|
|
+ compilerArgs.add("-Xlint:-removal")
|
|
+ compilerArgs.add("-Xlint:-dep-ann")
|
|
+ compilerArgs.add("--add-modules=jdk.incubator.vector") // Gale - Pufferfish - SIMD support
|
|
+}
|
|
+// Gale end - hide irrelevant compilation warnings
|
|
+
|
|
tasks.jar {
|
|
manifest {
|
|
val git = Git(rootProject.layout.projectDirectory.path)
|
|
val mcVersion = rootProject.providers.gradleProperty("mcVersion").get()
|
|
val build = System.getenv("BUILD_NUMBER") ?: null
|
|
- val buildTime = if (build != null) Instant.now() else Instant.EPOCH
|
|
+ val buildTime = Instant.now() // Gale - branding changes - we don't have ci yet
|
|
val gitHash = git.exec(providers, "rev-parse", "--short=7", "HEAD").get().trim()
|
|
val implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash"
|
|
val date = git.exec(providers, "show", "-s", "--format=%ci", gitHash).get().trim()
|
|
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 "Gale", // Gale - branding changes
|
|
"Implementation-Version" to implementationVersion,
|
|
"Implementation-Vendor" to date,
|
|
- "Specification-Title" to "Paper",
|
|
+ "Specification-Title" to "Gale", // Gale - branding changes
|
|
"Specification-Version" to project.version,
|
|
- "Specification-Vendor" to "Paper Team",
|
|
- "Brand-Id" to "papermc:paper",
|
|
- "Brand-Name" to "Paper",
|
|
+ "Specification-Vendor" to "GaleMC Team", // Gale - branding changes
|
|
+ "Brand-Id" to "galemc:gale", // Gale - branding changes
|
|
+ "Brand-Name" to "Gale", // Gale - branding changes
|
|
"Build-Number" to (build ?: ""),
|
|
"Build-Time" to buildTime.toString(),
|
|
"Git-Branch" to gitBranch,
|
|
@@ -281,6 +_,8 @@
|
|
val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2")
|
|
minHeapSize = "${memoryGb}G"
|
|
maxHeapSize = "${memoryGb}G"
|
|
+ jvmArgs("--enable-preview") // Gale - enable preview features for development runs
|
|
+ jvmArgs("--add-modules=jdk.incubator.vector") // Gale - Pufferfish - SIMD support
|
|
|
|
doFirst {
|
|
workingDir.mkdirs()
|
|
@@ -326,3 +_,62 @@
|
|
classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip })
|
|
mainClass.set(null as String?)
|
|
}
|
|
+
|
|
+// Gale start - package license into jar
|
|
+tasks.register<Copy>("copyLicense") {
|
|
+ from(layout.projectDirectory.file("../paper-server/LICENSE.txt"))
|
|
+ into(layout.buildDirectory.dir("tmp/copiedlicense"))
|
|
+}
|
|
+
|
|
+tasks.processResources {
|
|
+ dependsOn("copyLicense")
|
|
+}
|
|
+
|
|
+sourceSets {
|
|
+ main {
|
|
+ resources {
|
|
+ srcDir(layout.buildDirectory.dir("tmp/copiedlicense"))
|
|
+ }
|
|
+ }
|
|
+}
|
|
+// Gale end - package license into jar
|
|
+
|
|
+// Gale start - branding changes - package license into jar
|
|
+// Based on io.papermc.paperweight.core.taskcontainers.PaperclipTasks
|
|
+tasks.named("createMojmapPaperclipJar") {
|
|
+ val name = rootProject.name
|
|
+ val version = project.version
|
|
+ val licenseFileName = "LICENSE.txt"
|
|
+ val licenseFilePath = layout.projectDirectory.dir("../paper-server/$licenseFileName").asFile
|
|
+
|
|
+ // Based on io.papermc.paperweight.core.taskcontainers.PaperclipTasks
|
|
+ val jarName = listOfNotNull(
|
|
+ name,
|
|
+ "paperclip",
|
|
+ version,
|
|
+ "mojmap"
|
|
+ ).joinToString("-") + ".jar"
|
|
+
|
|
+ // Based on io.papermc.paperweight.core.taskcontainers.PaperclipTasks
|
|
+ val zipFile = layout.buildDirectory.file("libs/$jarName").get().path
|
|
+
|
|
+ val rootDir = findOutputDir(zipFile)
|
|
+
|
|
+ doLast {
|
|
+
|
|
+ try {
|
|
+ unzip(zipFile, rootDir)
|
|
+
|
|
+ licenseFilePath.copyTo(rootDir.resolve(licenseFileName).toFile())
|
|
+
|
|
+ ensureDeleted(zipFile)
|
|
+
|
|
+ zip(rootDir, zipFile)
|
|
+ } finally {
|
|
+ @OptIn(kotlin.io.path.ExperimentalPathApi::class)
|
|
+ rootDir.toFile().deleteRecursively()
|
|
+ }
|
|
+
|
|
+ }
|
|
+}
|
|
+// Gale end - branding changes - package license into jar
|