Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@1cc86be Update setup-gradle action
PaperMC/Paper@b0d7153 fix item meta
PaperMC/Paper@2206b9a fix components
PaperMC/Paper@e73d396 fix asset id
PaperMC/Paper@2a4ba00 add missing effect cause, for bee being poisoned
PaperMC/Paper@4806ce5 properly override push/knockback methods
PaperMC/Paper@bb4fb53 call EntityInsideBlockEvent for eyeblossom
PaperMC/Paper@ae060b3 Finish PlayerPickItemEvent
PaperMC/Paper@c54c062 Port exact choice improvements (#11705)
PaperMC/Paper@e4e24f3 Move around patches again
PaperMC/Paper@4c39ea2 More moving around of hunks
PaperMC/Paper@77afb9a Add new bundle animation (#11708)
PaperMC/Paper@346b9b8 Fixup PlayerPickItemEvent docs more
PaperMC/Paper@d4630f1 Fix broken joml metadata resulting in kotlin being included on compile/runtime classpath (#11712)
  • Loading branch information
granny committed Dec 6, 2024
1 parent bbae9c1 commit 2af2e71
Show file tree
Hide file tree
Showing 28 changed files with 105 additions and 106 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
distribution: temurin
java-version: 21
cache: 'gradle'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
- uses: gradle/actions/setup-gradle@v4
- name: Configure Git
run: git config --global user.email "[email protected]" && git config --global user.name "Github Actions"
- name: Apply Patches
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
java
`maven-publish`
id("io.papermc.paperweight.patcher") version "1.7.6"
id("io.papermc.paperweight.patcher") version "1.7.7"
}

allprojects {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.21.4-R0.1-SNAPSHOT

mcVersion = 1.21.4
paperCommit = 416a73304809d94c11a2bf22bbb2ad438a0dd68c
paperCommit = d4630f1223ba8cef0f9767d22f70999f1292cbcf

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
6 changes: 3 additions & 3 deletions patches/api/0001-Pufferfish-API-Changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

diff --git a/build.gradle.kts b/build.gradle.kts
index 8d76f0a8b6b67f0cae0b2fa23f0f79fc9fe97f30..ed46baad9fad925201cf2aeaea884a796af5dd9c 100644
index 571534b42cd9c33d6a7bb6fe3bf3a28e33f8e5de..5ceaca1bd75335f85b4876a394ea8c2643cda694 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -64,6 +64,7 @@ dependencies {
@@ -66,6 +66,7 @@ dependencies {
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("org.slf4j:slf4j-api:$slf4jVersion")
+ api("io.sentry:sentry:5.4.0") // Pufferfish

implementation("org.ow2.asm:asm:9.7.1")
implementation("org.ow2.asm:asm-commons:9.7.1")
@@ -148,6 +149,13 @@ val generateApiVersioningFile by tasks.registering {
@@ -150,6 +151,13 @@ val generateApiVersioningFile by tasks.registering {
}
}

Expand Down
4 changes: 2 additions & 2 deletions patches/api/0005-Build-System-Changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Build System Changes


diff --git a/build.gradle.kts b/build.gradle.kts
index ed46baad9fad925201cf2aeaea884a796af5dd9c..99a157ade959fd38da28851b3c698d8ea4736b86 100644
index 5ceaca1bd75335f85b4876a394ea8c2643cda694..49546dfbb4dd006b5a2419908890ba4c2a0e207a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -168,6 +168,8 @@ tasks.jar {
@@ -170,6 +170,8 @@ tasks.jar {
}

tasks.withType<Javadoc> {
Expand Down
32 changes: 16 additions & 16 deletions patches/server/0001-Pufferfish-Server-Changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ index c21e00812f1aaa1279834a0562d360d6b89e146c..877d2095a066854939f260ca4b0b8c7b
}

diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
index 4b002e8b75d117b726b0de274a76d3596fce015b..692c962193cf9fcc6801fc93f3220bdc673d527b 100644
index 8f62879582195d8ae4f64bd23f752fa133b1c973..8433c3ac440faa969069d1929b8b77fcb1080be7 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -593,7 +593,7 @@ public class Metrics {
@@ -592,7 +592,7 @@ public class Metrics {
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
// Only start Metrics, if it's enabled in the config
if (config.getBoolean("enabled", true)) {
Expand All @@ -143,7 +143,7 @@ index 4b002e8b75d117b726b0de274a76d3596fce015b..692c962193cf9fcc6801fc93f3220bdc

metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
String minecraftVersion = Bukkit.getVersion();
@@ -607,11 +607,11 @@ public class Metrics {
@@ -606,11 +606,11 @@ public class Metrics {
final String implVersion = org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion();
if (implVersion != null) {
final String buildOrHash = implVersion.substring(implVersion.lastIndexOf('-') + 1);
Expand Down Expand Up @@ -1017,13 +1017,13 @@ index 0000000000000000000000000000000000000000..facd55463d44cb7e3d2ca6892982f549
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ab4f1bd1ebf0af54f3fa88ee9e2007d20445e7e9..81591e2b51755b0b76ddceea32ea9f19004bfb13 100644
index ae4ebf509837e8d44255781c61d02873f8b74be8..312edb4c47a404c1d20e6bdf748a4ccb49a330f4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -333,6 +333,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
+ public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning

public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
Expand Down Expand Up @@ -1198,7 +1198,7 @@ index 103e2c414780be66324bcb9cd4ea539bbdfe12ad..c563326d3131bc726c7f43311c3eaa82
this.wasOnGround = this.entity.onGround();
this.teleportDelay = 0;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 7270a94246df73ee195156fc7b62470d090a337a..430e29b61feaf525ffa054469dd098a2c1d760f1 100644
index 1f898500d0e9b18a880645ceb0a8ff0fe75f4e48..fe295515b8043d988eb87c2caf516a4ae4169451 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -793,6 +793,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
Expand Down Expand Up @@ -1241,10 +1241,10 @@ index 7270a94246df73ee195156fc7b62470d090a337a..430e29b61feaf525ffa054469dd098a2

if (this.isRainingAt(blockposition)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2fbe3d8722eeacc3b27ce38145aeffa610f9daab..9646b13ee9fa1824b929eb8b8ce2302d1c461120 100644
index 84fa24880d02dc7ba1ec8bda3575be38447fd4b2..dedd8b3644699c4bdb33c9a7046342b620889b87 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1225,6 +1225,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1226,6 +1226,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

@Override
public void handleEditBook(ServerboundEditBookPacket packet) {
Expand All @@ -1253,7 +1253,7 @@ index 2fbe3d8722eeacc3b27ce38145aeffa610f9daab..9646b13ee9fa1824b929eb8b8ce2302d
final io.papermc.paper.configuration.type.number.IntOr.Disabled pageMax = io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.pageMax;
if (!this.cserver.isPrimaryThread() && pageMax.enabled()) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 27618d07d718cb2a5783536e11d56f712303487b..d337311b36db049b11c768bf16d8e7b5f31436dd 100644
index 1b547be0fe97119edf4f29666cfe0037e0c778e0..0348a458493c4fe22552ae2404272dd9b989d53e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -389,6 +389,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down Expand Up @@ -1333,7 +1333,7 @@ index 96b4fbe4a4655777ff10b32e3257e2fac2aba12a..ee2c88638f058172ef730de9b112ce65
if (this.isSpectator()) {
return false;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 5a3059cadbc9735b4b48745c6b1b11196596b06d..c68543bd7023e9022660ad9c7cbf72c8dc2a6e27 100644
index 5a0b51342f4a646101f4588697bcae7d1ca8a010..8ebe26c46db485ee0bdf64a313681d465051f436 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -231,14 +231,16 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
Expand All @@ -1355,7 +1355,7 @@ index 5a3059cadbc9735b4b48745c6b1b11196596b06d..c68543bd7023e9022660ad9c7cbf72c8
this.targetSelector.tick();
}
}
@@ -925,16 +927,20 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@@ -927,16 +929,20 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab

if (i % 2 != 0 && this.tickCount > 1) {
gameprofilerfiller.push("targetSelector");
Expand Down Expand Up @@ -1700,7 +1700,7 @@ index 2d8ba55906c8da16fde850e3412f4a6bda3d56e7..3fd86782134a674f58ef37288c8963a4
if (this.assignProfessionWhenSpawned) {
this.assignProfessionWhenSpawned = false;
diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java
index 36ba57e95b84f3d598bf4be624d6c88b05a6f9a6..9d467d401147308b9f6e3eb7be2d7606993825c3 100644
index 110456deaa662bc1c0f6ba7878bb3074869a4350..58c8e8f06f5cf028b158350327bf42984fcb4d38 100644
--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java
+++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java
@@ -636,6 +636,8 @@ public class Inventory implements Container, Nameable {
Expand Down Expand Up @@ -1786,7 +1786,7 @@ index b62db8c7c8c57e43869ee239ebf4b02f112355d9..2bee342e59e600426c8681a3ce641a12
}
}
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
index 6ec7b234b468755835107be40d0080222c0b9263..ab91d14f263ba2cdb2bbf4a8a2dd66898e709fe6 100644
index 12f95bee2a69fd5df7c4a165537e01299e60c5f6..4b3769020a92124bd5677cf75e268b8bc5ba2031 100644
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
@@ -31,8 +31,13 @@ public class ShapelessRecipe implements CraftingRecipe {
Expand Down Expand Up @@ -1828,9 +1828,9 @@ index 6ec7b234b468755835107be40d0080222c0b9263..ab91d14f263ba2cdb2bbf4a8a2dd6689
+ return ingredients.isEmpty();
+ }
+ // Pufferfish end
return input.ingredientCount() != this.ingredients.size() ? false : (input.size() == 1 && this.ingredients.size() == 1 ? ((Ingredient) this.ingredients.getFirst()).test(input.getItem(0)) : input.stackedContents().canCraft((Recipe) this, (StackedContents.Output) null));
}

// Paper start - Improve exact choice recipe ingredients & unwrap ternary
if (input.ingredientCount() != this.ingredients.size()) {
return false;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 27f9d167b5ae9ce5117798ea44324107df59425f..6470f145e2470574a40ddce6ca5bf924c1bb094c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0004-Purpur-config-files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Purpur config files


diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
index 692c962193cf9fcc6801fc93f3220bdc673d527b..8cde30544e14f8fc2dac32966ae3c21f8cf3a551 100644
index 8433c3ac440faa969069d1929b8b77fcb1080be7..4a8f95670e25c81952cccbaf4c6e49514cacd529 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -593,7 +593,7 @@ public class Metrics {
@@ -592,7 +592,7 @@ public class Metrics {
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
// Only start Metrics, if it's enabled in the config
if (config.getBoolean("enabled", true)) {
Expand All @@ -17,7 +17,7 @@ index 692c962193cf9fcc6801fc93f3220bdc673d527b..8cde30544e14f8fc2dac32966ae3c21f

metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
String minecraftVersion = Bukkit.getVersion();
@@ -602,16 +602,8 @@ public class Metrics {
@@ -601,16 +601,8 @@ public class Metrics {
}));

metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
Expand Down Expand Up @@ -112,7 +112,7 @@ index 6470f145e2470574a40ddce6ca5bf924c1bb094c..31ec722cfb102eaea5511aca07a48e4a
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ac8af406180bc680d46e8edc3da0fc2e5211345a..48a8bdd45c063797144e98e76f6007ae9025124e 100644
index 97b5d6ba2b19a7c730730c74175a29157aed1840..ac83ec97e5a55d2184c0c0d64b9b340f39c2be9f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1086,6 +1086,7 @@ public final class CraftServer implements Server {
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0005-Purpur-client-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Purpur client support


diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8aff5b7dd14b835788348b22b1fec4d381df816f..e223a732b8ff485645fa3a4c08c6bf6dff146dd7 100644
index fc7f7a34babd095a51b5321f600aef65a2a9d123..c067ac7481367afbcdb051b7a215ebf0f28e3c9c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -327,6 +327,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
Expand Down Expand Up @@ -43,10 +43,10 @@ index b0bc66dc7248aae691dcab68b925b52a1695e63f..b6dd6bde947ac7502f25d31603995961
try {
String channels = payload.toString(com.google.common.base.Charsets.UTF_8);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 84c494ca81b8f58604b372ac7236147776817a4f..d86bf4f995e8156f594fa90ebbab4165e52c0e09 100644
index 20f64850cb42d986358f01ffcdb42187e1684bca..0528b90bf718e4b3dc144cc33806126dfbe736e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3565,4 +3565,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3557,4 +3557,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundEntityEventPacket(((CraftEntity) target).getHandle(), effect.getData()));
}
// Paper end - entity effect API
Expand Down
Loading

0 comments on commit 2af2e71

Please sign in to comment.