Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@78eb3aaf Start discouraging world name use (#13760)
PaperMC/Paper@6f4b0045 Add earlier trigger for world migration delay in vanilla logic (#13792)
PaperMC/Paper@02ec8e95 [ci/skip] Remove dead disableGameRuleLimits property reading
This commit is contained in:
granny
2026-04-19 17:49:36 -07:00
parent e64b1b2add
commit 28ce941fa2
11 changed files with 39 additions and 27 deletions

View File

@@ -3,7 +3,7 @@ group = org.purpurmc.purpur
mcVersion = 26.1.2
apiVersion = 26.1.2
channel=EXPERIMENTAL
paperCommit = 8987f91c92631c1512cfafddf4eb2d3730ebf1af
paperCommit = 02ec8e9585c44d0ccbdf28495890308e25c045cb
org.gradle.configuration-cache = true
org.gradle.caching = true

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Purpur config files
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 413ad0c65fad59562413014c3db3f14af5da24a3..09a6042ba0ad63d7479ef48f0a8ddeeb3d9963bb 100644
index f9fd6bb7e60d31eeb52e0025b9ff4ceb34e789f1..5a3d675862a4a9d6efd86052d13081d6e142f7c4 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2440,6 +2440,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2444,6 +2444,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
}
// Paper end

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2776,4 +_,125 @@
@@ -2780,4 +_,125 @@
*/
void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
// Paper end - API to check if the server is sleeping

View File

@@ -18,10 +18,10 @@ index 64a82b414afd093c010878c150592c681665b735..1db70e2397137158c3df9603ea90743e
public boolean isClientAuthoritative() {
return false;
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 086cff320cc5ae85c12ab51746233c3aee2264aa..b8572c04a4f979defe8677d64a899b0d2eb252f2 100644
index 9589fc0621021f900ed62f929b7da69705c91573..0279b1d6456ec271b1fc706a9fb5608de179c383 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1861,6 +1861,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1862,6 +1862,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
for (ServerLevel level : this.getAllLevels()) {
level.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
level.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
@@ -30,7 +30,7 @@ index 086cff320cc5ae85c12ab51746233c3aee2264aa..b8572c04a4f979defe8677d64a899b0d
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = level.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
profiler.push(() -> level + " " + level.dimension().identifier());
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 7a3ebe0ec430c2626b099231ef9fe191fce2932d..76f2d334dc5b016a7c1f49db7bf58220a3698cc5 100644
index 3710e3ff7a65058dd4799459400a5be6bcf19cb8..7898b28dc2ccca20800d989334b625e8a95c935c 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -235,6 +235,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet

View File

@@ -359,10 +359,10 @@ index 9293faf988be7013dbeddc9f98beb69a2dac9928..4f1e08c0e3f8ea89a55e02e8f0197fe4
}
}
diff --git a/net/minecraft/world/level/gamerules/GameRules.java b/net/minecraft/world/level/gamerules/GameRules.java
index 0d0a4008a84defbf1ea962b4e2f73776878956ec..e2fc5dc10c6ab84cb28e2adff2f87c24c8801309 100644
index 49801f8b037913de5896d4e31a1e36d7ce597875..c333f0ca9c478f8a431fc85c50d6f97435c6d5ea 100644
--- a/net/minecraft/world/level/gamerules/GameRules.java
+++ b/net/minecraft/world/level/gamerules/GameRules.java
@@ -128,6 +128,13 @@ public class GameRules {
@@ -121,6 +121,13 @@ public class GameRules {
return this.rules.keySet().stream();
}

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Setting to reintroduce end void rings
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index b8572c04a4f979defe8677d64a899b0d2eb252f2..f336ac13c6a0a2ccfbe5a7bcc6db7f8b33eccbf9 100644
index 0279b1d6456ec271b1fc706a9fb5608de179c383..a653755f70f5f37b60bdd71f0ef51632cfc00186 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1350,6 +1350,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1351,6 +1351,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Purpur end - config for startup commands

View File

@@ -25,7 +25,7 @@
getTPS(this.tickTimes1m, interval),
getTPS(this.tickTimes5m, interval),
getTPS(this.tickTimes15m, interval)
@@ -1046,6 +_,15 @@
@@ -1047,6 +_,15 @@
LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -41,7 +41,7 @@
// CraftBukkit start
if (this.server != null) {
this.server.spark.disable(); // Paper - spark
@@ -1140,6 +_,8 @@
@@ -1141,6 +_,8 @@
this.safeShutdown(wait, false);
}
public void safeShutdown(final boolean wait, final boolean isRestarting) {
@@ -50,7 +50,7 @@
this.isRestarting = isRestarting;
this.hasLoggedStop = true; // Paper - Debugging
if (this.isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
@@ -1321,11 +_,21 @@
@@ -1322,11 +_,21 @@
}
// Paper end - Add onboarding message for initial server start
// Paper start - Improve outdated version checking
@@ -73,7 +73,7 @@
while (this.running) {
final long tickStart = System.nanoTime(); // Paper - improve tick loop
long thisTickNanos; // Paper - improve tick loop - diff on change, expect this to be tick interval
@@ -1339,9 +_,11 @@
@@ -1340,9 +_,11 @@
final long ticksBehind = Math.max(1L, this.tickSchedule.getPeriodsAhead(thisTickNanos, tickStart));
final long catchup = (long)Math.max(
1,
@@ -86,7 +86,7 @@
// adjust ticksBehind so that it is not greater-than catchup
if (ticksBehind - catchup > 0L) {
final long difference = ticksBehind - catchup;
@@ -1964,7 +_,7 @@
@@ -1965,7 +_,7 @@
}
public String getServerModName() {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -170,10 +_,54 @@
@@ -171,10 +_,54 @@
}
// Paper end - add paper world config
@@ -55,16 +55,16 @@
public CraftWorld getWorld() {
return this.world;
}
@@ -850,6 +_,8 @@
@@ -851,6 +_,8 @@
// Paper end - getblock optimisations - cache world height/sections
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName); // Spigot
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName, CraftNamespacedKey.fromMinecraft(dimension.identifier())); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
+ this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(bukkitName, environment); // Purpur - Purpur config files
+ this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(bukkitName, environment, CraftNamespacedKey.fromMinecraft(dimension.identifier())); // Purpur - Purpur config files
+ this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur - Add adjustable breeding cooldown to config
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment);
@@ -2192,4 +_,14 @@
@@ -2193,4 +_,14 @@
return this.moonrise$getEntityLookup().getEntityCount(); // Paper - rewrite chunk system
}
// Paper end - allow patching this logic

View File

@@ -25,10 +25,10 @@ index e47f279b66b169e2cdf762bb739a261f2acebeb1..cc1906ef871de6a4ff82039d8ddfcd76
}
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
index e0491ef5cfc06b5c23d448b8c9679a17e58bca26..0d3d9bd2f6aa1284dc237b5169372a2431c85fb8 100644
index cae151f0c6ecfc0dee3c2f7df29fd2bef075b74f..6df4d6fe4bb9906127d266c156973ac777cae56d 100644
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
@@ -291,6 +291,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
@@ -292,6 +292,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
for (NodePath path : RemovedConfigurations.REMOVED_GLOBAL_PATHS) {
builder.addAction(path, TransformAction.remove());
}

View File

@@ -74,8 +74,8 @@ public class PurpurConfig {
commands = new HashMap<>();
commands.put("purpur", new PurpurCommand("purpur"));
version = getInt("config-version", 47);
set("config-version", 47);
version = getInt("config-version", 48);
set("config-version", 48);
readConfig(PurpurConfig.class, null);

View File

@@ -6,6 +6,7 @@ import java.util.HashSet;
import java.util.Set;
import java.util.function.Predicate;
import java.util.logging.Level;
import net.kyori.adventure.key.Key;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.Identifier;
import net.minecraft.util.Mth;
@@ -19,6 +20,7 @@ import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.properties.Tilt;
import org.apache.commons.lang3.BooleanUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.configuration.ConfigurationSection;
@@ -35,16 +37,26 @@ import static org.purpurmc.purpur.PurpurConfig.log;
@SuppressWarnings("unused")
public class PurpurWorldConfig {
private final String legacyWorldName;
private final String worldName;
private final World.Environment environment;
public PurpurWorldConfig(String worldName, World.Environment environment) {
this.worldName = worldName;
public PurpurWorldConfig(String legacyWorldName, World.Environment environment, Key worldKey) {
this.legacyWorldName = legacyWorldName;
this.worldName = worldKey.asString();
this.environment = environment;
init();
}
public void init() {
if (PurpurConfig.version < 48) {
ConfigurationSection section = PurpurConfig.config.getConfigurationSection("world-settings." + this.legacyWorldName);
if (section != null) {
PurpurConfig.config.set("world-settings." + this.legacyWorldName, null);
PurpurConfig.config.set("world-settings." + this.worldName, section);
Bukkit.getLogger().info("NOTE: Migrated Purpur world config %s -> %s".formatted(this.legacyWorldName, this.worldName));
}
}
log("-------- World Settings For [" + worldName + "] --------");
PurpurConfig.readConfig(PurpurWorldConfig.class, this);
}