Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@ec548f93 1.21.6-pre3
PaperMC/Paper@66272e6a Bump server compile memory
PaperMC/Paper@a4e0777a Build updates
PaperMC/Paper@b81bb102 Add new attributes for 1.21.6
PaperMC/Paper@39ff9ed2 Pass hand to entity unleash event
PaperMC/Paper@f8bde6e1 Resend leash state
This commit is contained in:
granny
2025-06-04 16:25:52 -07:00
parent 2a46cfc530
commit 80872f173f
4 changed files with 112 additions and 111 deletions

View File

@@ -1,8 +1,8 @@
group = org.purpurmc.purpur
version = 1.21.6-R0.1-SNAPSHOT
mcVersion = 1.21.6-pre2
paperCommit = 4c4ddfcce5e83504e9de0d1418ed09f561b93f58
mcVersion = 1.21.6-pre3
paperCommit = f8bde6e1d0d303188572c5e6785b92dbbc07c218
org.gradle.configuration-cache = true
org.gradle.caching = true

View File

@@ -8,10 +8,108 @@
plugins {
`java-library`
@@ -20,13 +_,65 @@
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
@@ -24,9 +_,21 @@
minecraftVersion = providers.gradleProperty("mcVersion")
gitFilePatches = false
- updatingMinecraft {
- oldPaperCommit = "a033e3b9ef78cfe85be807ac3fd1dd956274d4db"
+ //updatingMinecraft {
+ // oldPaperCommit = "a033e3b9ef78cfe85be807ac3fd1dd956274d4db"
+ //}
+
+ // 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
@@ -109,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())
}
@@ -131,7 +_,7 @@
}
dependencies {
- implementation(project(":paper-api"))
+ implementation(project(":purpur-api")) // Purpur
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
@@ -159,6 +_,10 @@
implementation("org.spongepowered:configurate-yaml:4.2.0-20250225.064233-199")
implementation("org.spongepowered:configurate-core:4.2.0-20250225.064233-204") // Pinned dependency of above pinned yaml snapshot.
+ 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")
@@ -207,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,
@@ -273,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())
@@ -375,4 +_,44 @@
description = "Spin up a test server from the reobf Paperclip jar"
classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip })
mainClass.set(null as String?)
+}
+
+tasks.register("rebuildMinecraftSourcesWithGit") {
+ group = "temp"
+
@@ -50,101 +148,4 @@
+ }
+
+ return files.size
+}
+
paperweight {
minecraftVersion = providers.gradleProperty("mcVersion")
gitFilePatches = false
- updatingMinecraft {
- oldPaperCommit = "a033e3b9ef78cfe85be807ac3fd1dd956274d4db"
+ //updatingMinecraft {
+ // oldPaperCommit = "a033e3b9ef78cfe85be807ac3fd1dd956274d4db"
+ //}
+
+ // 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 {
buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc"
@@ -108,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())
}
@@ -130,7 +_,7 @@
}
dependencies {
- implementation(project(":paper-api"))
+ implementation(project(":purpur-api")) // Purpur
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
@@ -158,6 +_,10 @@
implementation("org.spongepowered:configurate-yaml:4.2.0-20250225.064233-199")
implementation("org.spongepowered:configurate-core:4.2.0-20250225.064233-204") // Pinned dependency of above pinned yaml snapshot.
+ 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")
@@ -206,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()
idea {
module {
generatedSourceDirs.add(generatedDir.toFile())

View File

@@ -75,10 +75,10 @@ index 014557e343d3ede351b3a2b950bb803d7e771490..628b1a5ac93d7cd1be8175aab88d2f5e
if ((target instanceof net.minecraft.world.entity.animal.Bucketable && target instanceof LivingEntity && origItem != null && origItem == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelectedItem().isEmpty() || !ServerGamePacketListenerImpl.this.player.getInventory().getSelectedItem().is(origItem))) {
target.resendPossiblyDesyncedEntityData(ServerGamePacketListenerImpl.this.player); // Paper - The entire mob gets deleted, so resend it
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 5351e368233d2bca5fe8568cb97c09e49293fb70..d4f9a29cfbb59d557eef790ca07575187c99854b 100644
index 4857161d69150e4c63ca54728ea12c0a59927acb..afc3d54982818a7ae5d9f3c6bae9c84f2ca8b7f6 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -3302,6 +3302,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3303,6 +3303,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.passengers = ImmutableList.copyOf(list);
}
@@ -92,7 +92,7 @@ index 5351e368233d2bca5fe8568cb97c09e49293fb70..d4f9a29cfbb59d557eef790ca0757518
this.gameEvent(GameEvent.ENTITY_MOUNT, passenger);
}
}
@@ -3343,6 +3350,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3344,6 +3351,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return false;
}
// CraftBukkit end
@@ -107,7 +107,7 @@ index 5351e368233d2bca5fe8568cb97c09e49293fb70..d4f9a29cfbb59d557eef790ca0757518
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
this.passengers = ImmutableList.of();
} else {
@@ -5388,4 +5403,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -5389,4 +5404,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
}
// Paper end - Expose entity id counter
@@ -1077,7 +1077,7 @@ index 354c7a41407fc6518965d09bfe3089676b6da794..a81ada76bfd6c4b49d1552f48e2009bc
}
}
diff --git a/net/minecraft/world/entity/animal/HappyGhast.java b/net/minecraft/world/entity/animal/HappyGhast.java
index 210b35ce4abe22d79c13c9c6dbd7114a723f66ee..e0491ba54d93f85359e11fdbc66775d11bcec7ac 100644
index 6e294ce65c8977db01ff1b9c8281c1c59ba156c0..d72af85b4605549aa73c7ef5956db30075325a16 100644
--- a/net/minecraft/world/entity/animal/HappyGhast.java
+++ b/net/minecraft/world/entity/animal/HappyGhast.java
@@ -120,6 +120,13 @@ public class HappyGhast extends Animal {

View File

@@ -107,7 +107,7 @@
// Paper start - EntityUnleashEvent
if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerUnleashEntityEvent(
leashable2, player, hand, !player.hasInfiniteMaterials()
@@ -3388,15 +_,18 @@
@@ -3389,15 +_,18 @@
return Vec3.directionFromRotation(this.getRotationVector());
}
@@ -127,7 +127,7 @@
}
}
}
@@ -3601,7 +_,7 @@
@@ -3602,7 +_,7 @@
}
public int getMaxAirSupply() {
@@ -136,7 +136,7 @@
}
public int getAirSupply() {
@@ -4146,7 +_,7 @@
@@ -4147,7 +_,7 @@
// CraftBukkit end
public boolean canUsePortal(boolean allowPassengers) {
@@ -145,7 +145,7 @@
}
public boolean canTeleport(Level fromLevel, Level toLevel) {
@@ -4671,6 +_,12 @@
@@ -4672,6 +_,12 @@
return Mth.lerp(partialTick, this.yRotO, this.yRot);
}
@@ -158,7 +158,7 @@
// Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
if (this.touchingUnloadedChunk()) {
@@ -5102,7 +_,7 @@
@@ -5103,7 +_,7 @@
}
public float maxUpStep() {