9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00

Start 1.21.11

This commit is contained in:
Lumine1909
2025-12-18 13:02:08 +08:00
parent d3a2173978
commit 1f600a02e7
268 changed files with 499 additions and 398 deletions

View File

@@ -14,7 +14,7 @@ subprojects {
extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
vendor = JvmVendorSpec.ADOPTIUM
//vendor = JvmVendorSpec.ADOPTIUM
}
}

View File

@@ -1,10 +1,13 @@
group=org.leavesmc.leaves
version=1.21.10-R0.1-SNAPSHOT
mcVersion=1.21.10
paperRef=af06383701d3c02e3e3cbd2ef5c5b55e2bbd0742
version=1.21.11-R0.1-SNAPSHOT
mcVersion=1.21.11
paperRef=1f94f1f7af8204ec7bbd94f7b0c1a8ba5fcf5ba8
preVersion=true
paper.runDisableWatchdog=true
# Set to true while updating Minecraft version
updatingMinecraft=true
org.gradle.configuration-cache=false
org.gradle.caching=true
org.gradle.parallel=true

View File

@@ -1,6 +1,6 @@
--- a/paper-api/build.gradle.kts
+++ b/paper-api/build.gradle.kts
@@ -89,19 +_,33 @@
@@ -91,19 +_,33 @@
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
@@ -35,7 +35,7 @@
val outgoingVariants = arrayOf("runtimeElements", "apiElements", "sourcesElements", "javadocElements")
val mainCapability = "${project.group}:${project.name}:${project.version}"
@@ -146,6 +_,16 @@
@@ -138,6 +_,16 @@
}
}
@@ -49,10 +49,10 @@
+}
+// Leaves end - hide irrelevant compilation warnings
+
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
@@ -165,7 +_,7 @@
abstract class GenerateApiVersioningFile : DefaultTask() {
@get:OutputFile
abstract val outputFile: RegularFileProperty
@@ -183,7 +_,7 @@
tasks.withType<Javadoc>().configureEach {
val options = options as StandardJavadocDocletOptions
@@ -61,7 +61,7 @@
options.use()
options.isDocFilesSubDirs = true
options.links(
@@ -198,16 +_,18 @@
@@ -216,16 +_,18 @@
}
// workaround for https://github.com/gradle/gradle/issues/4046

View File

@@ -0,0 +1,84 @@
--- a/paper-api/build.gradle.kts
+++ b/paper-api/build.gradle.kts
@@ -91,19 +_,33 @@
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
-val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
+val generatedDir: java.nio.file.Path = rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.toPath() // Leaves - build change
idea {
module {
generatedSourceDirs.add(generatedDir.toFile())
}
}
+// Leaves start - build change
sourceSets {
main {
java {
srcDir(generatedDir)
+ srcDir(file("../paper-api/src/main/java"))
+ }
+ resources {
+ srcDir(file("../paper-api/src/main/resources"))
+ }
+ }
+ test {
+ java {
+ srcDir(file("../paper-api/src/test/java"))
+ }
+ resources {
+ srcDir(file("../paper-api/src/test/resources"))
}
}
}
+// Leaves end - build change
val outgoingVariants = arrayOf("runtimeElements", "apiElements", "sourcesElements", "javadocElements")
val mainCapability = "${project.group}:${project.name}:${project.version}"
@@ -152,6 +_,16 @@
}
}
+// Leaves 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") // Leaves - SIMD support
+}
+// Leaves end - hide irrelevant compilation warnings
+
abstract class GenerateApiVersioningFile : DefaultTask() {
@get:OutputFile
abstract val outputFile: RegularFileProperty
@@ -165,7 +_,7 @@
tasks.withType<Javadoc>().configureEach {
val options = options as StandardJavadocDocletOptions
- options.overview = "src/main/javadoc/overview.html"
+ options.overview = "../paper-api/src/main/javadoc/overview.html" // Leaves - build change
options.use()
options.isDocFilesSubDirs = true
options.links(
@@ -198,16 +_,18 @@
}
// workaround for https://github.com/gradle/gradle/issues/4046
- inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
+ inputs.dir("../paper-api/src/main/javadoc").withPropertyName("javadoc-sourceset") // Leaves - build change
val fsOps = services.fileSystemOperations
doLast {
fsOps.copy {
- from("src/main/javadoc") {
+ from("../paper-api/src/main/javadoc") { // Leaves - build change
include("**/doc-files/**")
}
into("build/docs/javadoc")
}
}
+ options.addStringOption("Xdoclint:none", "-quiet") // Leaves - hide irrelevant compilation warnings
+ options.addStringOption("-add-modules", "jdk.incubator.vector") // Leaves - SIMD support
}
tasks.test {

View File

@@ -5,12 +5,12 @@
import io.papermc.paperweight.attribute.DevBundleOutput
import io.papermc.paperweight.util.*
import java.time.Instant
@@ -7,22 +_,34 @@
@@ -7,21 +_,33 @@
`java-library`
`maven-publish`
idea
- id("io.papermc.paperweight.core")
- id("io.papermc.fill.gradle") version "1.0.9"
- id("io.papermc.fill.gradle") version "1.0.10"
+ id("org.leavesmc.leavesweight.core") // Leaves - build change
}
@@ -18,10 +18,9 @@
+val leavesMavenPublicUrl = "https://repo.leavesmc.com/snapshots/" // Leaves - build change
dependencies {
mache("io.papermc:mache:1.21.10+build.9")
mache("io.papermc:mache:1.21.11+build.1")
- paperclip("io.papermc:paperclip:3.0.3")
+ leavesclip("org.leavesmc:leavesclip:3.0.8") // Leaves - build change
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
+ leavesclip("org.leavesmc:leavesclip:3.0.10") // Leaves - build change
}
paperweight {
@@ -42,9 +41,20 @@
+ // Leaves end - build change
+
spigot {
enabled = true
enabled = false
buildDataRef = "42d18d4c4653ffc549778dbe223f6994a031d69e"
@@ -46,6 +_,7 @@
@@ -40,15 +_,18 @@
"org.spigotmc",
)
+ /* Leaves - TEMP
updatingMinecraft {
// oldPaperCommit = "c82b438b5b4ea0b230439b8e690e34708cd11ab3"
}
+ */
}
tasks.generateDevelopmentBundle {
libraryRepositories.addAll(
"https://repo.maven.apache.org/maven2/",
paperMavenPublicUrl,
@@ -85,7 +95,7 @@
+ implementation("commons-lang:commons-lang:2.6") // Leaves - build change
+ // Leaves start - linear
+ implementation("com.github.luben:zstd-jni:1.5.4-1")
+ implementation("org.lz4:lz4-java:1.8.0")
+ implementation("at.yawk.lz4:lz4-java:1.8.1")
+ implementation("net.openhft:zero-allocation-hashing:0.16")
+ // Leaves end - linear
+ // Leaves start - leaves plugin
@@ -105,7 +115,7 @@
runtimeOnly("org.xerial:sqlite-jdbc:3.49.1.0")
runtimeOnly("com.mysql:mysql-connector-j:9.2.0")
runtimeOnly("com.lmax:disruptor:3.4.4")
@@ -185,26 +_,36 @@
@@ -186,26 +_,36 @@
implementation("me.lucko:spark-paper:1.10.152")
}
@@ -148,7 +158,7 @@
"Build-Number" to (build ?: ""),
"Build-Time" to buildTime.toString(),
"Git-Branch" to gitBranch,
@@ -263,7 +_,7 @@
@@ -264,7 +_,7 @@
jvmArgumentProviders.add(provider)
}
@@ -157,7 +167,7 @@
idea {
module {
generatedSourceDirs.add(generatedDir.toFile())
@@ -300,6 +_,10 @@
@@ -301,6 +_,10 @@
}
args("--nogui")
@@ -168,7 +178,7 @@
systemProperty("net.kyori.adventure.text.warnWhenLegacyFormattingDetected", true)
if (providers.gradleProperty("paper.runDisableWatchdog").getOrElse("false") == "true") {
systemProperty("disable.watchdog", true)
@@ -344,30 +_,26 @@
@@ -345,30 +_,26 @@
classpath(tasks.createReobfBundlerJar.flatMap { it.outputZip })
mainClass.set(null as String?)
}
@@ -189,7 +199,7 @@
- version(paperweight.minecraftVersion)
-
- build {
- channel = BuildChannel.STABLE
- channel = BuildChannel.ALPHA
-
- downloads {
- register("server:default") {

View File

@@ -23,11 +23,11 @@ index fb263fa1f30a7dfcb7ec2656abfb38e5fe88eac9..56fd1ed7ccaf96e7eedea60fbdbf7f93
@Override
public CustomPacketPayload decode(B buffer) {
ResourceLocation resourceLocation = buffer.readResourceLocation();
- return (CustomPacketPayload)this.findCodec(resourceLocation).decode(buffer);
Identifier Identifier = buffer.readIdentifier();
- return (CustomPacketPayload)this.findCodec(Identifier).decode(buffer);
+ // Leaves start - protocol core
+ var payload = org.leavesmc.leaves.protocol.core.LeavesProtocolManager.decode(resourceLocation, buffer);
+ return java.util.Objects.requireNonNullElseGet(payload, () -> this.findCodec(resourceLocation).decode(buffer));
+ var payload = org.leavesmc.leaves.protocol.core.LeavesProtocolManager.decode(Identifier, buffer);
+ return java.util.Objects.requireNonNullElseGet(payload, () -> this.findCodec(Identifier).decode(buffer));
+ // Leaves end - protocol core
}
};
@@ -74,7 +74,7 @@ index c6db2c96db96453daaf49779f588f75f7c3d3d60..adb26ae4dfd5dc111cc55000b71c15f9
+ org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePayload(org.leavesmc.leaves.protocol.core.ProtocolUtils.createSelector(this), leavesPayload);
+ return;
+ }
+ if (packet.payload() instanceof net.minecraft.network.protocol.common.custom.DiscardedPayload(net.minecraft.resources.ResourceLocation id, byte[] data)) {
+ if (packet.payload() instanceof net.minecraft.network.protocol.common.custom.DiscardedPayload(net.minecraft.resources.Identifier id, byte[] data)) {
+ if (org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handleBytebuf(org.leavesmc.leaves.protocol.core.ProtocolUtils.createSelector(this), id, io.netty.buffer.Unpooled.wrappedBuffer(data))) {
+ return;
+ }

View File

@@ -51,7 +51,7 @@ index 8612cdf7161f8ddff60a6478cc901318b8f958ba..07a962d647baa99b0e1bf3898a07cc91
@@ -50,7 +50,7 @@ public class LootTable {
public static final LootTable EMPTY = new LootTable(LootContextParamSets.EMPTY, Optional.empty(), List.of(), List.of());
private final ContextKeySet paramSet;
private final Optional<ResourceLocation> randomSequence;
private final Optional<Identifier> randomSequence;
- private final List<LootPool> pools;
+ public final List<LootPool> pools; // Leaves - private -> public
private final List<LootItemFunction> functions;

Some files were not shown because too many files have changed in this diff Show More