mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@c1ea550 Remove more outdated config settings (#9358) PaperMC/Paper@3a03739 Add method to get ungenerated chunk from long key (#9254) PaperMC/Paper@072b78a Add trail ruins structure set seed in spigot config (#9327) PaperMC/Paper@faf9a65 Disable BukkitMirrorTest PaperMC/Paper@873533b Add method to remove all active potion effects (#9361) PaperMC/Paper@275173e Updated Upstream (Bukkit/CraftBukkit) PaperMC/Paper@976b95c Temp: Pre-init PlayerChunkLoaderData in order to prepopulate the BFS lookup cache because potatos (Closes #9338) PaperMC/Paper@d6d4c78 Move some Folia API to Paper for easy compat (#9360) PaperMC/Paper@b1fe756 Revert "Move some Folia API to Paper for easy compat (#9360)" PaperMC/Paper@1f5bec7 Pull Folia API take two PaperMC/Paper@3756f5b Properly Cancel Usable Items (#9225)
This commit is contained in:
@@ -56,9 +56,18 @@ index d2f0a0755317f5fa9a1ccf7db346aa77fd287d80..03852e7d21d9470a4469676367463fef
|
||||
} catch (Exception exception) {
|
||||
if (listener.shouldPropagateHandlingExceptions()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e5399649e6a34145dfe2154acdd9887ba4f9f1cb..dc70b971a37ef71e6c44dc6d3204ccfd60ce5b88 100644
|
||||
index b6abc36cd0209ebdd6deb233bbe7b16dd139c91b..3a8eeacc042f5af41c6c87169a50009b72045150 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
|
||||
public volatile Thread shutdownThread; // Paper
|
||||
public volatile boolean abnormalExit = false; // Paper
|
||||
public boolean isIteratingOverLevels = false; // Paper
|
||||
-
|
||||
+
|
||||
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) {
|
||||
@@ -1405,15 +1405,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public void onServerExit() {}
|
||||
|
||||
@@ -99,7 +108,7 @@ index e5399649e6a34145dfe2154acdd9887ba4f9f1cb..dc70b971a37ef71e6c44dc6d3204ccfd
|
||||
}
|
||||
|
||||
private ServerStatus buildServerStatus() {
|
||||
@@ -1503,26 +1503,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1503,9 +1503,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void tickChildren(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -108,6 +117,11 @@ index e5399649e6a34145dfe2154acdd9887ba4f9f1cb..dc70b971a37ef71e6c44dc6d3204ccfd
|
||||
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
||||
- MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
||||
+ //MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
// Paper start - Folia scheduler API
|
||||
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
|
||||
getAllLevels().forEach(level -> level.getAllEntities().forEach(entity -> {
|
||||
@@ -1520,21 +1520,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");
|
||||
- MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
|
||||
@@ -133,7 +147,7 @@ index e5399649e6a34145dfe2154acdd9887ba4f9f1cb..dc70b971a37ef71e6c44dc6d3204ccfd
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
// Paper start - optimize time updates
|
||||
for (final ServerLevel level : this.getAllLevels()) {
|
||||
@@ -1542,7 +1542,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1554,7 +1554,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
@@ -142,7 +156,7 @@ index e5399649e6a34145dfe2154acdd9887ba4f9f1cb..dc70b971a37ef71e6c44dc6d3204ccfd
|
||||
|
||||
this.isIteratingOverLevels = true; // Paper
|
||||
Iterator iterator = this.getAllLevels().iterator(); // Paper - move down
|
||||
@@ -1567,14 +1567,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1579,14 +1579,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.profiler.push("tick");
|
||||
|
||||
try {
|
||||
@@ -159,7 +173,7 @@ index e5399649e6a34145dfe2154acdd9887ba4f9f1cb..dc70b971a37ef71e6c44dc6d3204ccfd
|
||||
} catch (Throwable throwable) {
|
||||
// Spigot Start
|
||||
CrashReport crashreport;
|
||||
@@ -1597,24 +1597,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1609,24 +1609,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.isIteratingOverLevels = false; // Paper
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
@@ -190,7 +204,7 @@ index e5399649e6a34145dfe2154acdd9887ba4f9f1cb..dc70b971a37ef71e6c44dc6d3204ccfd
|
||||
|
||||
this.profiler.pop();
|
||||
}
|
||||
@@ -2801,7 +2801,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2813,7 +2813,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -199,7 +213,7 @@ index e5399649e6a34145dfe2154acdd9887ba4f9f1cb..dc70b971a37ef71e6c44dc6d3204ccfd
|
||||
try {
|
||||
for (;;) {
|
||||
boolean moreTasks = this.tickMidTickTasks();
|
||||
@@ -2828,7 +2828,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2840,7 +2840,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
@@ -629,10 +643,10 @@ index 122defeec159165c5fef295ec1dd2da4a6ada622..5b7507db055d7be59b369f66e659e128
|
||||
|
||||
} else if (close) { chunkproviderserver.close(false); } // Paper - rewrite chunk system
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8303cdf0590dc50452b1fd747ec78e46026152f9..52b9d600409dd4accb78f6eff2ffbaefcae8d322 100644
|
||||
index 24c93583ce1c0b58e434345974c9fd025720f75a..13f07c874cdf9a8063ce8f72d2402d27e6a1e7e5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2591,7 +2591,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2592,7 +2592,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
}
|
||||
// Paper End
|
||||
@@ -641,7 +655,7 @@ index 8303cdf0590dc50452b1fd747ec78e46026152f9..52b9d600409dd4accb78f6eff2ffbaef
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
|
||||
@@ -2601,7 +2601,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2602,7 +2602,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -650,7 +664,7 @@ index 8303cdf0590dc50452b1fd747ec78e46026152f9..52b9d600409dd4accb78f6eff2ffbaef
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2614,7 +2614,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2615,7 +2615,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
} finally {
|
||||
@@ -660,10 +674,10 @@ index 8303cdf0590dc50452b1fd747ec78e46026152f9..52b9d600409dd4accb78f6eff2ffbaef
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 7f46fac70a4cf041443197b1832a848974b6c45a..fb3a59fda3d4f5b2bca665b5665df2a355c61a15 100644
|
||||
index 89e773a73a0010fe376d0c7a68335eb72e6fa355..ebcdf6aee72b817b9bbba8f8d580eae1876fc6e5 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1248,7 +1248,7 @@ public abstract class PlayerList {
|
||||
@@ -1249,7 +1249,7 @@ public abstract class PlayerList {
|
||||
|
||||
public void saveAll(int interval) {
|
||||
io.papermc.paper.util.MCUtil.ensureMain("Save Players" , () -> { // Paper - Ensure main
|
||||
@@ -672,7 +686,7 @@ index 7f46fac70a4cf041443197b1832a848974b6c45a..fb3a59fda3d4f5b2bca665b5665df2a3
|
||||
int numSaved = 0;
|
||||
long now = MinecraftServer.currentTick;
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
@@ -1259,7 +1259,7 @@ public abstract class PlayerList {
|
||||
@@ -1260,7 +1260,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user