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@2a39276 Add CrafterCraftEvent (#11082)
PaperMC/Paper@75af62b Split rewriting flag into `paper.disableOldApiSupport` and `paper.disablePluginRemapping` (#11108)
PaperMC/Paper@7ea4039 Fixup startup time log message
PaperMC/Paper@e71c1df Call PlayerChunkUnloadEvent
PaperMC/Paper@968bdeb Make CraftComplexRecipe extend CraftingRecipe (#11114)
PaperMC/Paper@f1f01a1 Adjust done message again (#11118)
  • Loading branch information
granny committed Jul 20, 2024
1 parent 65d3665 commit 936c29a
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 48 deletions.
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-R0.1-SNAPSHOT

mcVersion = 1.21
paperCommit = d08e8d1afabcce6a40bab5863f2c297cd7ba8cfa
paperCommit = f1f01a1622625cd995420f3971e41422302b9cd9

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0001-Rebrand.patch
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ index 2f4d6b56301195f8d39ed50dffe842464065bfe1..30ddb35140ae4a6faba98c191bb8eadb
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 28b3ad04e1f4b38ce21084864a59a2cd81b3992c..217f7383f6facb67b10e7725be0f8505e5e21a44 100644
index 41c34ffdf9d95a04ed55a1e09ebc78e8cf946777..4f25368d55496667f1dc2cb2879b6d783464292b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -481,7 +481,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -487,7 +487,7 @@ public final class CraftMagicNumbers implements UnsafeValues {

@Override
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0007-Ridables.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ index 2767d6f97e8b314d23a8e62f22dfd396f5660d31..a64e5997b94cc8173f0512d1e282355f
super(x, y, z);
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 57e84cf2219d28c37e4c042371afddf585334954..b39afb48ff53ce70f94316cce3e1ad82327c6eb1 100644
index 8160c35368fc2c52d6f4a42df27adb2ef6eb87f3..810424fc57a00ad4f5345c02393c0467109485e9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1780,6 +1780,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1778,6 +1778,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
worldserver.updateLagCompensationTick(); // Paper - lag compensation
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0013-Configurable-server-mod-name.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable server mod name


diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b39afb48ff53ce70f94316cce3e1ad82327c6eb1..1f5ecd8f8486463733b0fb8289e3d9254858c873 100644
index 810424fc57a00ad4f5345c02393c0467109485e9..3a339cae287b751452e5dd7a57b6ce10f3c73e7e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1938,7 +1938,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1936,7 +1936,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

@DontObfuscate
public String getServerModName() {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0014-Lagging-threshold.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Lagging threshold


diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1f5ecd8f8486463733b0fb8289e3d9254858c873..e58209eb38031b4df3894798f902101640100542 100644
index 3a339cae287b751452e5dd7a57b6ce10f3c73e7e..bac247a9e1b95c095933bf79724d5f37e61f16e6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -319,6 +319,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -16,7 +16,7 @@ index 1f5ecd8f8486463733b0fb8289e3d9254858c873..e58209eb38031b4df3894798f9021016

public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper
@@ -1281,6 +1282,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1279,6 +1280,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.recentTps[0] = tps1.getAverage();
this.recentTps[1] = tps5.getAverage();
this.recentTps[2] = tps15.getAverage();
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0044-Configurable-TPS-Catchup.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable TPS Catchup


diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e58209eb38031b4df3894798f902101640100542..d6e66773cf0c88edc14d0670852c6270214e0794 100644
index bac247a9e1b95c095933bf79724d5f37e61f16e6..039a20441b884c801369c9e8b1dc87cfb43f85d4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1313,6 +1313,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1311,6 +1311,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.popPush("nextTickWait");
this.mayHaveDelayedTasks = true;
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0057-Add-5-second-tps-average-in-tps.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ index 039a86034928a5eb7aaa2d7ca76a7bddcca346bd..308f67d0616e2d6bb135258f1fda53cc
}

diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d6e66773cf0c88edc14d0670852c6270214e0794..a08be48afd408b0976e8813071e0e28433512657 100644
index 039a20441b884c801369c9e8b1dc87cfb43f85d4..8597bbaa749628c69c6a7634d7fb8580410cde10 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -314,7 +314,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -38,7 +38,7 @@ index d6e66773cf0c88edc14d0670852c6270214e0794..a08be48afd408b0976e8813071e0e284
public final RollingAverage tps1 = new RollingAverage(60);
public final RollingAverage tps5 = new RollingAverage(60 * 5);
public final RollingAverage tps15 = new RollingAverage(60 * 15);
@@ -1274,14 +1275,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1272,14 +1273,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
final long diff = currentTime - tickSection;
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0092-Configurable-daylight-cycle.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ index 76ef195a5074006b009acd9cc1744667c6aecbb9..659577549e132754281df76a7a1bfd88
public ClientboundSetTimePacket(long time, long timeOfDay, boolean doDaylightCycle) {
this.gameTime = time;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a08be48afd408b0976e8813071e0e28433512657..729450af7818fd084d6d224b58f2a3834922245b 100644
index 8597bbaa749628c69c6a7634d7fb8580410cde10..01d6f79477d44097397bf62ad3a4b3af94a9a473 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1772,7 +1772,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1770,7 +1770,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long worldTime = level.getGameTime();
final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
for (Player entityhuman : level.players()) {
Expand Down
20 changes: 10 additions & 10 deletions patches/server/0251-Remove-Timings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ index e2c24813f59c2fd075c740ac1842a38f20ed8554..01efbc507b3d58f13f78ee286f93df40
} catch (Exception exception) {
if (exception instanceof ReportedException) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4cf4c138b8494f7a7f4a0efeeece571a1c405943..b7d0f2f07ee7f9f7c93a01ffd3453db06ab9cd9f 100644
index d884b0a34cdd5f3eb518d779e7240d4e81941ed8..696cbee14df0efda70d01c57dcd905a6c06fb7fe 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1602,15 +1602,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1600,15 +1600,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}

public void tickServer(BooleanSupplier shouldKeepTicking) {
Expand All @@ -64,7 +64,7 @@ index 4cf4c138b8494f7a7f4a0efeeece571a1c405943..b7d0f2f07ee7f9f7c93a01ffd3453db0
// Paper end
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events

@@ -1646,9 +1646,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1644,9 +1644,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
// Paper end - Incremental chunk and player saving
// Paper start - move executeAll() into full server tick timing
Expand All @@ -76,7 +76,7 @@ index 4cf4c138b8494f7a7f4a0efeeece571a1c405943..b7d0f2f07ee7f9f7c93a01ffd3453db0
// Paper end
// Paper start - Server Tick Events
long endTime = System.nanoTime();
@@ -1671,7 +1671,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1669,7 +1669,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.logTickMethodTime(i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
Expand All @@ -85,7 +85,7 @@ index 4cf4c138b8494f7a7f4a0efeeece571a1c405943..b7d0f2f07ee7f9f7c93a01ffd3453db0
}

private void logTickMethodTime(long tickStartTime) {
@@ -1742,9 +1742,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1740,9 +1740,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
entityplayer.connection.suspendFlushing();
});
Expand All @@ -97,7 +97,7 @@ index 4cf4c138b8494f7a7f4a0efeeece571a1c405943..b7d0f2f07ee7f9f7c93a01ffd3453db0
// Paper start - Folia scheduler API
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
getAllLevels().forEach(level -> {
@@ -1761,21 +1761,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1759,21 +1759,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
this.profiler.push("commandFunctions");
Expand All @@ -124,7 +124,7 @@ index 4cf4c138b8494f7a7f4a0efeeece571a1c405943..b7d0f2f07ee7f9f7c93a01ffd3453db0
// Send time updates to everyone, it will get the right time from the world the player is in.
// Paper start - Perf: Optimize time updates
for (final ServerLevel level : this.getAllLevels()) {
@@ -1795,7 +1795,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1793,7 +1793,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Paper end - Perf: Optimize time updates
Expand All @@ -133,7 +133,7 @@ index 4cf4c138b8494f7a7f4a0efeeece571a1c405943..b7d0f2f07ee7f9f7c93a01ffd3453db0

this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
@@ -1823,9 +1823,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1821,9 +1821,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.push("tick");

try {
Expand All @@ -145,7 +145,7 @@ index 4cf4c138b8494f7a7f4a0efeeece571a1c405943..b7d0f2f07ee7f9f7c93a01ffd3453db0
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");

@@ -1840,24 +1840,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1838,24 +1838,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked

this.profiler.popPush("connection");
Expand Down Expand Up @@ -177,7 +177,7 @@ index 4cf4c138b8494f7a7f4a0efeeece571a1c405943..b7d0f2f07ee7f9f7c93a01ffd3453db0
this.profiler.popPush("send chunks");
iterator = this.playerList.getPlayers().iterator();
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index a25855521ab4a3a8bcb5bbae6973b9fe77f645de..73f1080559ae91a89feca60bcc3812b086e16f8f 100644
index 02b997fa9718326be9021417adaa776b0df4cbb2..e94ccd93c936186e897df95b4bad717412b164b8 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -543,7 +543,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand Down
Loading

0 comments on commit 936c29a

Please sign in to comment.