Skip to content

Commit 80872f1

Browse files
committed
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
1 parent 2a46cfc commit 80872f1

4 files changed

Lines changed: 65 additions & 64 deletions

File tree

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
group = org.purpurmc.purpur
22
version = 1.21.6-R0.1-SNAPSHOT
33

4-
mcVersion = 1.21.6-pre2
5-
paperCommit = 4c4ddfcce5e83504e9de0d1418ed09f561b93f58
4+
mcVersion = 1.21.6-pre3
5+
paperCommit = f8bde6e1d0d303188572c5e6785b92dbbc07c218
66

77
org.gradle.configuration-cache = true
88
org.gradle.caching = true

purpur-server/build.gradle.kts.patch

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -8,51 +8,7 @@
88

99
plugins {
1010
`java-library`
11-
@@ -20,13 +_,65 @@
12-
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
13-
}
14-
15-
+tasks.register("rebuildMinecraftSourcesWithGit") {
16-
+ group = "temp"
17-
+
18-
+ val patchDir = project.rootDir.resolve("purpur-server/minecraft-patches/sources").convertToPath().cleanDir()
19-
+ val inputDir = this.project.rootDir.resolve("purpur-server/src/minecraft/java").convertToPath()
20-
+
21-
+ val git = Git(inputDir)
22-
+ git("stash", "push").executeSilently(silenceErr = true)
23-
+ git("checkout", "file").executeSilently(silenceErr = true)
24-
+
25-
+ rebuildWithGit(git, patchDir)
26-
+}
27-
+
28-
+private fun rebuildWithGit(
29-
+ git: Git,
30-
+ patchDir: java.nio.file.Path
31-
+): Int {
32-
+ val files = git("diff-tree", "--name-only", "--no-commit-id", "-r", "HEAD").getText().split("\n")
33-
+ files.parallelStream().forEach { filename ->
34-
+ if (filename.isBlank()) return@forEach
35-
+ val patch = git(
36-
+ "format-patch",
37-
+ "--diff-algorithm=myers",
38-
+ "--full-index",
39-
+ "--no-signature",
40-
+ "--no-stat",
41-
+ "--no-numbered",
42-
+ "-1",
43-
+ "HEAD",
44-
+ "--stdout",
45-
+ filename
46-
+ ).getText()
47-
+ val patchFile = patchDir.resolve("$filename.patch")
48-
+ patchFile.createParentDirectories()
49-
+ patchFile.writeText(patch)
50-
+ }
51-
+
52-
+ return files.size
53-
+}
54-
+
55-
paperweight {
11+
@@ -24,9 +_,21 @@
5612
minecraftVersion = providers.gradleProperty("mcVersion")
5713
gitFilePatches = false
5814

@@ -75,8 +31,8 @@
7531
+ // Purpur end - Rebrand
7632

7733
spigot {
78-
buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc"
79-
@@ -108,7 +_,21 @@
34+
enabled = false
35+
@@ -109,7 +_,21 @@
8036
}
8137
}
8238

@@ -99,7 +55,7 @@
9955
configurations.named(log4jPlugins.compileClasspathConfigurationName) {
10056
extendsFrom(configurations.compileClasspath.get())
10157
}
102-
@@ -130,7 +_,7 @@
58+
@@ -131,7 +_,7 @@
10359
}
10460

10561
dependencies {
@@ -108,7 +64,7 @@
10864
implementation("ca.spottedleaf:concurrentutil:0.0.3")
10965
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
11066
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
111-
@@ -158,6 +_,10 @@
67+
@@ -159,6 +_,10 @@
11268
implementation("org.spongepowered:configurate-yaml:4.2.0-20250225.064233-199")
11369
implementation("org.spongepowered:configurate-core:4.2.0-20250225.064233-204") // Pinned dependency of above pinned yaml snapshot.
11470

@@ -119,7 +75,7 @@
11975
// Deps that were previously in the API but have now been moved here for backwards compat, eventually to be removed
12076
runtimeOnly("commons-lang:commons-lang:2.6")
12177
runtimeOnly("org.xerial:sqlite-jdbc:3.49.1.0")
122-
@@ -206,14 +_,14 @@
78+
@@ -207,14 +_,14 @@
12379
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
12480
attributes(
12581
"Main-Class" to "org.bukkit.craftbukkit.Main",
@@ -139,12 +95,57 @@
13995
"Build-Number" to (build ?: ""),
14096
"Build-Time" to buildTime.toString(),
14197
"Git-Branch" to gitBranch,
142-
@@ -267,7 +_,7 @@
98+
@@ -273,7 +_,7 @@
14399
jvmArgumentProviders.add(provider)
144100
}
145101

146102
-val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
147-
+val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("../paper-server/src/generated/java").asFile.toPath()
103+
+val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("../paper-server/src/generated/java").asFile.toPath() // Purpur
148104
idea {
149105
module {
150106
generatedSourceDirs.add(generatedDir.toFile())
107+
@@ -375,4 +_,44 @@
108+
description = "Spin up a test server from the reobf Paperclip jar"
109+
classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip })
110+
mainClass.set(null as String?)
111+
+}
112+
+
113+
+tasks.register("rebuildMinecraftSourcesWithGit") {
114+
+ group = "temp"
115+
+
116+
+ val patchDir = project.rootDir.resolve("purpur-server/minecraft-patches/sources").convertToPath().cleanDir()
117+
+ val inputDir = this.project.rootDir.resolve("purpur-server/src/minecraft/java").convertToPath()
118+
+
119+
+ val git = Git(inputDir)
120+
+ git("stash", "push").executeSilently(silenceErr = true)
121+
+ git("checkout", "file").executeSilently(silenceErr = true)
122+
+
123+
+ rebuildWithGit(git, patchDir)
124+
+}
125+
+
126+
+private fun rebuildWithGit(
127+
+ git: Git,
128+
+ patchDir: java.nio.file.Path
129+
+): Int {
130+
+ val files = git("diff-tree", "--name-only", "--no-commit-id", "-r", "HEAD").getText().split("\n")
131+
+ files.parallelStream().forEach { filename ->
132+
+ if (filename.isBlank()) return@forEach
133+
+ val patch = git(
134+
+ "format-patch",
135+
+ "--diff-algorithm=myers",
136+
+ "--full-index",
137+
+ "--no-signature",
138+
+ "--no-stat",
139+
+ "--no-numbered",
140+
+ "-1",
141+
+ "HEAD",
142+
+ "--stdout",
143+
+ filename
144+
+ ).getText()
145+
+ val patchFile = patchDir.resolve("$filename.patch")
146+
+ patchFile.createParentDirectories()
147+
+ patchFile.writeText(patch)
148+
+ }
149+
+
150+
+ return files.size
151+
}

purpur-server/minecraft-patches/features/0001-Ridables.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ index 014557e343d3ede351b3a2b950bb803d7e771490..628b1a5ac93d7cd1be8175aab88d2f5e
7575
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))) {
7676
target.resendPossiblyDesyncedEntityData(ServerGamePacketListenerImpl.this.player); // Paper - The entire mob gets deleted, so resend it
7777
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
78-
index 5351e368233d2bca5fe8568cb97c09e49293fb70..d4f9a29cfbb59d557eef790ca07575187c99854b 100644
78+
index 4857161d69150e4c63ca54728ea12c0a59927acb..afc3d54982818a7ae5d9f3c6bae9c84f2ca8b7f6 100644
7979
--- a/net/minecraft/world/entity/Entity.java
8080
+++ b/net/minecraft/world/entity/Entity.java
81-
@@ -3302,6 +3302,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
81+
@@ -3303,6 +3303,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
8282
this.passengers = ImmutableList.copyOf(list);
8383
}
8484

@@ -92,7 +92,7 @@ index 5351e368233d2bca5fe8568cb97c09e49293fb70..d4f9a29cfbb59d557eef790ca0757518
9292
this.gameEvent(GameEvent.ENTITY_MOUNT, passenger);
9393
}
9494
}
95-
@@ -3343,6 +3350,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
95+
@@ -3344,6 +3351,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
9696
return false;
9797
}
9898
// CraftBukkit end
@@ -107,7 +107,7 @@ index 5351e368233d2bca5fe8568cb97c09e49293fb70..d4f9a29cfbb59d557eef790ca0757518
107107
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
108108
this.passengers = ImmutableList.of();
109109
} else {
110-
@@ -5388,4 +5403,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
110+
@@ -5389,4 +5404,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
111111
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
112112
}
113113
// Paper end - Expose entity id counter
@@ -1077,7 +1077,7 @@ index 354c7a41407fc6518965d09bfe3089676b6da794..a81ada76bfd6c4b49d1552f48e2009bc
10771077
}
10781078
}
10791079
diff --git a/net/minecraft/world/entity/animal/HappyGhast.java b/net/minecraft/world/entity/animal/HappyGhast.java
1080-
index 210b35ce4abe22d79c13c9c6dbd7114a723f66ee..e0491ba54d93f85359e11fdbc66775d11bcec7ac 100644
1080+
index 6e294ce65c8977db01ff1b9c8281c1c59ba156c0..d72af85b4605549aa73c7ef5956db30075325a16 100644
10811081
--- a/net/minecraft/world/entity/animal/HappyGhast.java
10821082
+++ b/net/minecraft/world/entity/animal/HappyGhast.java
10831083
@@ -120,6 +120,13 @@ public class HappyGhast extends Animal {

purpur-server/minecraft-patches/sources/net/minecraft/world/entity/Entity.java.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
// Paper start - EntityUnleashEvent
108108
if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerUnleashEntityEvent(
109109
leashable2, player, hand, !player.hasInfiniteMaterials()
110-
@@ -3388,15 +_,18 @@
110+
@@ -3389,15 +_,18 @@
111111
return Vec3.directionFromRotation(this.getRotationVector());
112112
}
113113

@@ -127,7 +127,7 @@
127127
}
128128
}
129129
}
130-
@@ -3601,7 +_,7 @@
130+
@@ -3602,7 +_,7 @@
131131
}
132132

133133
public int getMaxAirSupply() {
@@ -136,7 +136,7 @@
136136
}
137137

138138
public int getAirSupply() {
139-
@@ -4146,7 +_,7 @@
139+
@@ -4147,7 +_,7 @@
140140
// CraftBukkit end
141141

142142
public boolean canUsePortal(boolean allowPassengers) {
@@ -145,7 +145,7 @@
145145
}
146146

147147
public boolean canTeleport(Level fromLevel, Level toLevel) {
148-
@@ -4671,6 +_,12 @@
148+
@@ -4672,6 +_,12 @@
149149
return Mth.lerp(partialTick, this.yRotO, this.yRot);
150150
}
151151

@@ -158,7 +158,7 @@
158158
// Paper start - optimise collisions
159159
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
160160
if (this.touchingUnloadedChunk()) {
161-
@@ -5102,7 +_,7 @@
161+
@@ -5103,7 +_,7 @@
162162
}
163163

164164
public float maxUpStep() {

0 commit comments

Comments
 (0)