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
This commit is contained in:
granny
2025-01-17 08:14:03 +00:00
parent dd41439842
commit b7f79d49fb
13 changed files with 27 additions and 35 deletions

View File

@@ -40,5 +40,5 @@ ij_java_use_fq_class_names = true
[purpur-server/src/minecraft/resources/data/**/*.json] [purpur-server/src/minecraft/resources/data/**/*.json]
indent_size = 2 indent_size = 2
[paper-api-generator/generated/**/*.java] [paper-api/src/generated/**/*.java]
ij_java_imports_layout = $*,|,* ij_java_imports_layout = $*,|,*

1
.gitignore vendored
View File

@@ -57,6 +57,5 @@ manifest.mf
/paper-server /paper-server
/purpur-api/build.gradle.kts /purpur-api/build.gradle.kts
/paper-api /paper-api
/paper-api-generator
*.jar *.jar
test-plugin.settings.gradle.kts test-plugin.settings.gradle.kts

View File

@@ -46,14 +46,8 @@ javac 21.0.5
## Understanding Patches ## Understanding Patches
Unlike the Purpur API and its implementation, modifications to Paper and Minecraft source files Unlike the Purpur API and its implementation, modifications to Paper and Minecraft source files
are done through patches. These patches/extensions are split into different are done through patches. These patches/extensions are split into three different sets of two
three different sets of two categories, which are formatted like so: categories, which are formatted like so:
Under `purpur-api-generator`:
- `paper-patches` (applies to the `paper-api/` git repo)
- `sources`: Per-file patches to Paper API Generator classes;
- `features`: Larger feature patches that modify multiple Paper API Generator classes.
Under `purpur-api`: Under `purpur-api`:
@@ -81,13 +75,12 @@ Assuming you have already forked the repository:
2. Type `./gradlew applyAllPatches` in a terminal to apply the patches to both paper and minecraft classes. 2. Type `./gradlew applyAllPatches` in a terminal to apply the patches to both paper and minecraft classes.
On Windows, remove `./` from the beginning of `gradlew` commands; On Windows, remove `./` from the beginning of `gradlew` commands;
3. cd into `purpur-server` for server changes, `purpur-api` for API changes, 3. cd into `purpur-server` for server changes, `purpur-api` for API changes,
`paper-api` for Paper API changes, `paper-api-generator` for Paper API Generator changes, `paper-api` for Paper API changes, and `paper-server` for Paper Server changes.
and `paper-server` for Paper Server changes.
`purpur-server/src/minecraft/java` and `purpur-server/src/minecraft/java/resources` are not git repositories in the traditional sense. `purpur-server/src/minecraft/java` and `purpur-server/src/minecraft/java/resources` are not git repositories in the traditional sense.
Its initial commits are the decompiled and deobfuscated Minecraft source and resource files. The per-file Its initial commits are the decompiled and deobfuscated Minecraft source and resource files. The per-file
patches are applied on top of these files as a single, large commit, which is then followed patches are applied on top of these files as a single, large commit, which is then followed
by the individual feature-patch commits. `paper-api/`, `paper-api-generator/`, and `paper-server/` by the individual feature-patch commits. `paper-api/` and `paper-server/`
follow the same concept; each paper "project" has its own git repository that also includes it's own feature and per-file patches. follow the same concept; each paper "project" has its own git repository that also includes it's own feature and per-file patches.
## Understanding the Gradle Tasks ## Understanding the Gradle Tasks

View File

@@ -3,7 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins { plugins {
java // TODO java launcher tasks java // TODO java launcher tasks
id("io.papermc.paperweight.patcher") version "2.0.0-beta.13" id("io.papermc.paperweight.patcher") version "2.0.0-beta.14"
} }
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
@@ -28,11 +28,6 @@ paperweight {
patchesDir = file("purpur-api/paper-patches") patchesDir = file("purpur-api/paper-patches")
outputDir = file("paper-api") outputDir = file("paper-api")
} }
patchDir("paperApiGenerator") {
upstreamPath = "paper-api-generator"
patchesDir = file("purpur-api-generator/paper-patches")
outputDir = file("paper-api-generator")
}
} }
} }

View File

@@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.21.4-R0.1-SNAPSHOT version = 1.21.4-R0.1-SNAPSHOT
mcVersion = 1.21.4 mcVersion = 1.21.4
paperCommit = 8e80d4e15852ffbed1a18d1e9b34550191433200 paperCommit = b1b88cd31687c5b3f80c4b0b51fd93a63b3e2498
org.gradle.configuration-cache = true org.gradle.configuration-cache = true
#org.gradle.caching = true #org.gradle.caching = true

View File

@@ -1,5 +1,14 @@
--- a/paper-api/build.gradle.kts --- a/paper-api/build.gradle.kts
+++ b/paper-api/build.gradle.kts +++ b/paper-api/build.gradle.kts
@@ -93,7 +_,7 @@
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
-val generatedApiPath: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
+val generatedApiPath: java.nio.file.Path = rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.toPath()
idea {
module {
generatedSourceDirs.add(generatedApiPath.toFile())
@@ -103,6 +_,18 @@ @@ -103,6 +_,18 @@
main { main {
java { java {

View File

@@ -1,5 +1,5 @@
--- a/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java --- a/src/generated/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java +++ b/src/generated/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -441,6 +_,26 @@ @@ -441,6 +_,26 @@
GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class); GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class);

View File

@@ -1,6 +1,6 @@
--- a/paper-server/build.gradle.kts --- a/paper-server/build.gradle.kts
+++ b/paper-server/build.gradle.kts +++ b/paper-server/build.gradle.kts
@@ -21,6 +_,20 @@ @@ -21,6 +_,16 @@
// macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java") // macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java")
// gitFilePatches = true // gitFilePatches = true
@@ -13,10 +13,6 @@
+ } + }
+ } + }
+ activeFork = purpur + activeFork = purpur
+
+ paper {
+ paperServerDir = upstreamsDirectory().map { it.dir("paper/paper-server") }
+ }
+ +
spigot { spigot {
buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42" buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42"

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Ridables
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 03ff6e062f92d0405dcf10bd35c6ba2fa553b8c0..4e584c69e3f13e7e441dc8a69d57287fc349841d 100644 index b0be1ef065986c7e8aa94dde814a303d1dec5529..c843d28de6cdd7fa25cfbfe7cf071de063df05f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1344,4 +1344,27 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1345,4 +1345,27 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
} }
} }
// Paper end - broadcast hurt animation // Paper end - broadcast hurt animation

View File

@@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 4e584c69e3f13e7e441dc8a69d57287fc349841d..762cd2f3a18bcb4039f8d232f1175aaac4ef623d 100644 index c843d28de6cdd7fa25cfbfe7cf071de063df05f8..3bb597cbce650e408273c07a7c120845c99b053b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -260,6 +260,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -261,6 +261,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
boolean retainPassengers = flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS); boolean retainPassengers = flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS);
// Don't allow teleporting between worlds while keeping passengers // Don't allow teleporting between worlds while keeping passengers
if (flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS) && this.entity.isVehicle() && location.getWorld() != this.getWorld()) { if (flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS) && this.entity.isVehicle() && location.getWorld() != this.getWorld()) {

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] API for any mob to burn daylight
Co-authored by: Encode42 <me@encode42.dev> Co-authored by: Encode42 <me@encode42.dev>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 762cd2f3a18bcb4039f8d232f1175aaac4ef623d..8755fc950af21e076858de7aafe3b562982299cf 100644 index 3bb597cbce650e408273c07a7c120845c99b053b..dca2761fe4765c6e95b5db0d0cb5c818eb8697b4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -101,6 +101,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -102,6 +102,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
} }
// Purpur end - Fire Immunity API // Purpur end - Fire Immunity API

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -89,6 +_,18 @@ @@ -90,6 +_,18 @@
this.entityType = CraftEntityType.minecraftToBukkit(entity.getType()); this.entityType = CraftEntityType.minecraftToBukkit(entity.getType());
} }

View File

@@ -32,7 +32,7 @@ if (!file(".git").exists()) {
} }
rootProject.name = "purpur" rootProject.name = "purpur"
for (name in listOf("purpur-api", "purpur-server", "purpur-api-generator")) { for (name in listOf("purpur-api", "purpur-server")) {
val projName = name.lowercase(Locale.ENGLISH) val projName = name.lowercase(Locale.ENGLISH)
include(projName) include(projName)
findProject(":$projName")!!.projectDir = file(name) findProject(":$projName")!!.projectDir = file(name)