Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit b7f79d4

Browse files
committed
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b6be7cd [ci skip] Move generated API sources to src/generated/java (#11977) PaperMC/Paper@cd9d6d6 Allow duplicate relative flags in entity teleport PaperMC/Paper@b1b88cd [ci skip] Update paperweight to 2.0.0-beta.14
1 parent dd41439 commit b7f79d4

13 files changed

Lines changed: 27 additions & 35 deletions

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ ij_java_use_fq_class_names = true
4040
[purpur-server/src/minecraft/resources/data/**/*.json]
4141
indent_size = 2
4242

43-
[paper-api-generator/generated/**/*.java]
43+
[paper-api/src/generated/**/*.java]
4444
ij_java_imports_layout = $*,|,*

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,5 @@ manifest.mf
5757
/paper-server
5858
/purpur-api/build.gradle.kts
5959
/paper-api
60-
/paper-api-generator
6160
*.jar
6261
test-plugin.settings.gradle.kts

CONTRIBUTING.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,8 @@ javac 21.0.5
4646
## Understanding Patches
4747

4848
Unlike the Purpur API and its implementation, modifications to Paper and Minecraft source files
49-
are done through patches. These patches/extensions are split into different
50-
three different sets of two categories, which are formatted like so:
51-
52-
Under `purpur-api-generator`:
53-
54-
- `paper-patches` (applies to the `paper-api/` git repo)
55-
- `sources`: Per-file patches to Paper API Generator classes;
56-
- `features`: Larger feature patches that modify multiple Paper API Generator classes.
49+
are done through patches. These patches/extensions are split into three different sets of two
50+
categories, which are formatted like so:
5751

5852
Under `purpur-api`:
5953

@@ -81,13 +75,12 @@ Assuming you have already forked the repository:
8175
2. Type `./gradlew applyAllPatches` in a terminal to apply the patches to both paper and minecraft classes.
8276
On Windows, remove `./` from the beginning of `gradlew` commands;
8377
3. cd into `purpur-server` for server changes, `purpur-api` for API changes,
84-
`paper-api` for Paper API changes, `paper-api-generator` for Paper API Generator changes,
85-
and `paper-server` for Paper Server changes.
78+
`paper-api` for Paper API changes, and `paper-server` for Paper Server changes.
8679

8780
`purpur-server/src/minecraft/java` and `purpur-server/src/minecraft/java/resources` are not git repositories in the traditional sense.
8881
Its initial commits are the decompiled and deobfuscated Minecraft source and resource files. The per-file
8982
patches are applied on top of these files as a single, large commit, which is then followed
90-
by the individual feature-patch commits. `paper-api/`, `paper-api-generator/`, and `paper-server/`
83+
by the individual feature-patch commits. `paper-api/` and `paper-server/`
9184
follow the same concept; each paper "project" has its own git repository that also includes it's own feature and per-file patches.
9285

9386
## Understanding the Gradle Tasks

build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
33

44
plugins {
55
java // TODO java launcher tasks
6-
id("io.papermc.paperweight.patcher") version "2.0.0-beta.13"
6+
id("io.papermc.paperweight.patcher") version "2.0.0-beta.14"
77
}
88

99
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
@@ -28,11 +28,6 @@ paperweight {
2828
patchesDir = file("purpur-api/paper-patches")
2929
outputDir = file("paper-api")
3030
}
31-
patchDir("paperApiGenerator") {
32-
upstreamPath = "paper-api-generator"
33-
patchesDir = file("purpur-api-generator/paper-patches")
34-
outputDir = file("paper-api-generator")
35-
}
3631
}
3732
}
3833

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ group = org.purpurmc.purpur
22
version = 1.21.4-R0.1-SNAPSHOT
33

44
mcVersion = 1.21.4
5-
paperCommit = 8e80d4e15852ffbed1a18d1e9b34550191433200
5+
paperCommit = b1b88cd31687c5b3f80c4b0b51fd93a63b3e2498
66

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

purpur-api/build.gradle.kts.patch

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
--- a/paper-api/build.gradle.kts
22
+++ b/paper-api/build.gradle.kts
3+
@@ -93,7 +_,7 @@
4+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
5+
}
6+
7+
-val generatedApiPath: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
8+
+val generatedApiPath: java.nio.file.Path = rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.toPath()
9+
idea {
10+
module {
11+
generatedSourceDirs.add(generatedApiPath.toFile())
312
@@ -103,6 +_,18 @@
413
main {
514
java {

purpur-api-generator/paper-patches/files/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java.patch renamed to purpur-api/paper-patches/files/src/generated/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- a/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java
2-
+++ b/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java
1+
--- a/src/generated/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
2+
+++ b/src/generated/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
33
@@ -441,6 +_,26 @@
44

55
GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class);

purpur-server/build.gradle.kts.patch

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/paper-server/build.gradle.kts
22
+++ b/paper-server/build.gradle.kts
3-
@@ -21,6 +_,20 @@
3+
@@ -21,6 +_,16 @@
44
// macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java")
55
// gitFilePatches = true
66

@@ -13,10 +13,6 @@
1313
+ }
1414
+ }
1515
+ activeFork = purpur
16-
+
17-
+ paper {
18-
+ paperServerDir = upstreamsDirectory().map { it.dir("paper/paper-server") }
19-
+ }
2016
+
2117
spigot {
2218
buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42"

purpur-server/paper-patches/features/0002-Ridables.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Subject: [PATCH] Ridables
55

66

77
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
8-
index 03ff6e062f92d0405dcf10bd35c6ba2fa553b8c0..4e584c69e3f13e7e441dc8a69d57287fc349841d 100644
8+
index b0be1ef065986c7e8aa94dde814a303d1dec5529..c843d28de6cdd7fa25cfbfe7cf071de063df05f8 100644
99
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
1010
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
11-
@@ -1344,4 +1344,27 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
11+
@@ -1345,4 +1345,27 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
1212
}
1313
}
1414
// Paper end - broadcast hurt animation

purpur-server/paper-patches/features/0005-Add-EntityTeleportHinderedEvent.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License
1717
along with this program. If not, see <https://www.gnu.org/licenses/>.
1818

1919
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
20-
index 4e584c69e3f13e7e441dc8a69d57287fc349841d..762cd2f3a18bcb4039f8d232f1175aaac4ef623d 100644
20+
index c843d28de6cdd7fa25cfbfe7cf071de063df05f8..3bb597cbce650e408273c07a7c120845c99b053b 100644
2121
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
2222
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
23-
@@ -260,6 +260,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
23+
@@ -261,6 +261,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
2424
boolean retainPassengers = flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS);
2525
// Don't allow teleporting between worlds while keeping passengers
2626
if (flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS) && this.entity.isVehicle() && location.getWorld() != this.getWorld()) {

0 commit comments

Comments
 (0)