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@2946dbb Update WorldServer#serverlevelData mapping
PaperMC/Paper@98af0e0 update generator
PaperMC/Paper@20507b4 Apply more patches
PaperMC/Paper@7162ff0 fix item meta
PaperMC/Paper@7d67d3f fix DamageTypeTags init
PaperMC/Paper@0971875 re-add improve perf of mass crafts
  • Loading branch information
granny committed Oct 27, 2024
1 parent 76614d2 commit 10cf696
Show file tree
Hide file tree
Showing 26 changed files with 112 additions and 112 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.3-R0.1-SNAPSHOT

mcVersion = 1.21.3
paperCommit = b14d336442a1928e21ad2eb28768bd0632961682
paperCommit = 09718757bfae5296edbd61b70938fffd2b11f1a2

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
4 changes: 2 additions & 2 deletions patches/generated-api/0001-Ridables.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Ridables


diff --git a/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 02411466bdcf4ff731f01ccebb2c99942e0db878..e81f3efa9986a3199ceb8e58c93dcf48d358fd35 100644
index e0aa5b925cbd6c2733ad70cb0722c7ab7c4d0419..db9a027260a93e1ccf5209623e44220164a5910c 100644
--- a/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -436,6 +436,12 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
@@ -440,6 +440,12 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {

GoalKey<Zombie> ZOMBIE_ATTACK_TURTLE_EGG = create("zombie_attack_turtle_egg", Zombie.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Phantoms attracted to crystals and crystals shoot phantoms


diff --git a/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index e81f3efa9986a3199ceb8e58c93dcf48d358fd35..7c814236923319f41de9abd5cbc12f95ce95b525 100644
index db9a027260a93e1ccf5209623e44220164a5910c..e78ac52499f82b553f64aa1c41e5b75397e72793 100644
--- a/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -440,6 +440,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
@@ -444,6 +444,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Mob> MOB_HAS_RIDER = GoalKey.of(Mob.class, NamespacedKey.minecraft("has_rider"));
GoalKey<AbstractHorse> HORSE_HAS_RIDER = GoalKey.of(AbstractHorse.class, NamespacedKey.minecraft("horse_has_rider"));
GoalKey<Llama> LLAMA_HAS_RIDER = GoalKey.of(Llama.class, NamespacedKey.minecraft("llama_has_rider"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Add option to disable zombie aggressiveness towards villagers


diff --git a/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 7c814236923319f41de9abd5cbc12f95ce95b525..3c5b1b91f066110b3535210e9bbb1b139c1783a0 100644
index e78ac52499f82b553f64aa1c41e5b75397e72793..6299eeed974666135e63d58e064ea2e40f2c84d9 100644
--- a/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -442,6 +442,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
@@ -446,6 +446,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Llama> LLAMA_HAS_RIDER = GoalKey.of(Llama.class, NamespacedKey.minecraft("llama_has_rider"));
GoalKey<Phantom> FIND_CRYSTAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("find_crystal"));
GoalKey<Phantom> ORBIT_CRYSTAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("orbit_crystal"));
Expand Down
4 changes: 2 additions & 2 deletions patches/generated-api/0004-Rabid-Wolf-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Rabid Wolf API


diff --git a/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 3c5b1b91f066110b3535210e9bbb1b139c1783a0..3e5b701a6fb2b8a89a61221f3e68b65547a0717f 100644
index 6299eeed974666135e63d58e064ea2e40f2c84d9..b776641219febcbf6b6b76fd27ea40a907cab745 100644
--- a/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -444,6 +444,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
@@ -448,6 +448,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Phantom> ORBIT_CRYSTAL = GoalKey.of(Phantom.class, NamespacedKey.minecraft("orbit_crystal"));
GoalKey<Drowned> DROWNED_ATTACK_VILLAGER = GoalKey.of(Drowned.class, NamespacedKey.minecraft("drowned_attack_villager"));
GoalKey<Zombie> ZOMBIE_ATTACK_VILLAGER = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack_villager"));
Expand Down
4 changes: 2 additions & 2 deletions patches/generated-api/0005-Iron-golem-poppy-calms-anger.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Iron golem poppy calms anger


diff --git a/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 3e5b701a6fb2b8a89a61221f3e68b65547a0717f..2718c0e5061838b01881bb231c53f4da348adce3 100644
index b776641219febcbf6b6b76fd27ea40a907cab745..51cea31c55c7e1a00cfb966349147fc874e1736b 100644
--- a/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -445,6 +445,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
@@ -449,6 +449,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Drowned> DROWNED_ATTACK_VILLAGER = GoalKey.of(Drowned.class, NamespacedKey.minecraft("drowned_attack_villager"));
GoalKey<Zombie> ZOMBIE_ATTACK_VILLAGER = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack_villager"));
GoalKey<Wolf> AVOID_RABID_WOLF = GoalKey.of(Wolf.class, NamespacedKey.minecraft("avoid_rabid_wolf"));
Expand Down
10 changes: 5 additions & 5 deletions patches/server/0001-Rebrand.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand


diff --git a/build.gradle.kts b/build.gradle.kts
index 9966576652ed6007d2228237f292c1dc83ede485..c8c44df62289accad53d436383adbed134539049 100644
index 9b3a6b336cb1344d4e74e0e4f7c50ffd1e1b8955..ccb31eb5993db028d0cbf104261205c9462f8734 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
Expand All @@ -28,7 +28,7 @@ index 9966576652ed6007d2228237f292c1dc83ede485..c8c44df62289accad53d436383adbed1
testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0")
@@ -81,14 +85,14 @@ tasks.jar {
@@ -85,14 +89,14 @@ tasks.jar {
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
Expand All @@ -48,7 +48,7 @@ index 9966576652ed6007d2228237f292c1dc83ede485..c8c44df62289accad53d436383adbed1
"Build-Number" to (build ?: ""),
"Build-Time" to Instant.now().toString(),
"Git-Branch" to gitBranch, // Paper
@@ -149,7 +153,7 @@ fun TaskContainer.registerRunTask(
@@ -153,7 +157,7 @@ fun TaskContainer.registerRunTask(
name: String,
block: JavaExec.() -> Unit
): TaskProvider<JavaExec> = register<JavaExec>(name) {
Expand Down Expand Up @@ -214,10 +214,10 @@ index b24265573fdef5d9a964bcd76146f34542c420cf..710477ae27ebc5afdf0012ef0867d05e

public SystemReport getSystemReport() {
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 2d5c1b91b814316bf9f2f22bcd30adacc8970b01..82a661db5fc88e4e06befc0abf720d3e9fb8da97 100644
index 78922c3e9a69db1774dd846047b79e9523d7cf41..0dde7cd71a32e6c0cde6cbbaef585896a3d7dae7 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -243,7 +243,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -274,7 +274,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise

// Paper start
private static void printOversizedLog(String msg, Path file, int x, int z) {
Expand Down
18 changes: 9 additions & 9 deletions patches/server/0002-Purpur-config-files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ index 13bd145b1e8006a53c22f5dc0c78f29b540c7663..ae2d9c91afe13d07fd0de6d455b90a2a
boolean flag1 = this.source.acceptsSuccess() && !this.silent;
boolean flag2 = broadcastToOps && this.source.shouldInformAdmins() && !this.silent;
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 7a79541db29cc47c844d617fc8a4360f61c73372..3267240e8be56a6dc152805c23269f47ab0f54df 100644
index f8ee4b6c481d3fe15f48bf4a93696dd23e4f01a4..7bd2c48cecfc07b95798f09d8f8b3e1e826651ea 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -235,6 +235,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
thread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized
@@ -237,6 +237,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
+ // Purpur start
+ try {
Expand Down Expand Up @@ -112,34 +112,34 @@ index 044985030607bc20a61666dee7dd2659ae4553b5..580ddacce37e50e392999d45fdfa9f42
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 a34e40e273a79a234c3d79b6ad360ce3a4d35ba3..910539a3c6f89d5f6cf120d36014ed33b05ac39a 100644
index 742d4cd3b42c1f4807c8ecb27ffa6df905d7f0ac..db8f42d4b9f434641df67c6f6cc272a8820a8094 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1073,6 +1073,7 @@ public final class CraftServer implements Server {
@@ -1075,6 +1075,7 @@ public final class CraftServer implements Server {

org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
+ org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -1088,6 +1089,7 @@ public final class CraftServer implements Server {
@@ -1090,6 +1091,7 @@ public final class CraftServer implements Server {
}
}
world.spigotConfig.init(); // Spigot
+ world.purpurConfig.init(); // Purpur
}

Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1104,6 +1106,7 @@ public final class CraftServer implements Server {
this.reloadData();
@@ -1107,6 +1109,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
this.spark.registerCommandBeforePlugins(this); // Paper - spark
+ org.purpurmc.purpur.PurpurConfig.registerCommands(); // Purpur
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");

@@ -2968,6 +2971,18 @@ public final class CraftServer implements Server {
@@ -2972,6 +2975,18 @@ public final class CraftServer implements Server {
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}

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 f58a94efafbc01d402cd03a108bb90f60930a316..21ea63da99c5b3e2e1ab9cc1049c903b
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 79f3dc4f53dce892c4756b0850352e0ca2eb95a6..dc9e3f798bc8a9a6968a588a09122a08dc9b9774 100644
index de80ac827c8ac3630d68b73cb425d4b56f7d2cd7..42b18348a27fa74f042f906eb58785b1b6c5ae23 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1848,6 +1848,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1854,6 +1854,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
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
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0012-Bring-back-server-name.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ index 52e61f75f922a075ccc745198f4ba6ad8fa58ea2..b97d8f43f24baf36eca9064b2b48bf6c
public final boolean allowFlight = this.get("allow-flight", false);
public final String motd = this.get("motd", "A Minecraft Server");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 910539a3c6f89d5f6cf120d36014ed33b05ac39a..b9aee2a00b35e8f53240d5854ba05785e9688b22 100644
index db8f42d4b9f434641df67c6f6cc272a8820a8094..bf757970ccfa46a1a88673016fa87a97029b42ac 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -3210,4 +3210,11 @@ public final class CraftServer implements Server {
@@ -3214,4 +3214,11 @@ public final class CraftServer implements Server {
return this.potionBrewer;
}
// Paper end
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 dc9e3f798bc8a9a6968a588a09122a08dc9b9774..99b1c6f239a85eb82019a1bae9e91391fcb55519 100644
index 42b18348a27fa74f042f906eb58785b1b6c5ae23..606971e6f7a3356ad99263ebf46efdf4c562616a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2011,7 +2011,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2017,7 +2017,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

@DontObfuscate
public String getServerModName() {
Expand Down
8 changes: 4 additions & 4 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 99b1c6f239a85eb82019a1bae9e91391fcb55519..a0bcb0fccadbf946e4c4bc0bbb8a1460532c636b 100644
index 606971e6f7a3356ad99263ebf46efdf4c562616a..f702adb26c19a91b3874c773d540973296b97a97 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -329,6 +329,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -16,7 +16,7 @@ index 99b1c6f239a85eb82019a1bae9e91391fcb55519..a0bcb0fccadbf946e4c4bc0bbb8a1460

public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper
@@ -1299,6 +1300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1303,6 +1304,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.recentTps[0] = tps1.getAverage();
this.recentTps[1] = tps5.getAverage();
this.recentTps[2] = tps15.getAverage();
Expand All @@ -25,10 +25,10 @@ index 99b1c6f239a85eb82019a1bae9e91391fcb55519..a0bcb0fccadbf946e4c4bc0bbb8a1460
}
// Paper end - further improve server tick loop
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b9aee2a00b35e8f53240d5854ba05785e9688b22..febd5dc39cbe96054d21d13b14947bdf65384054 100644
index bf757970ccfa46a1a88673016fa87a97029b42ac..3089564b9bab5eb9f1a06dd2c45737cd62795fe4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -3216,5 +3216,10 @@ public final class CraftServer implements Server {
@@ -3220,5 +3220,10 @@ public final class CraftServer implements Server {
public String getServerName() {
return this.getProperties().serverName;
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0043-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 a0bcb0fccadbf946e4c4bc0bbb8a1460532c636b..fd37f9256c1b2d396e855e1167a1f2ca473d58d2 100644
index f702adb26c19a91b3874c773d540973296b97a97..8b92b8543eba058a86ca21024b7a95a607f753c3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1339,6 +1339,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1343,6 +1343,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
gameprofilerfiller.popPush("nextTickWait");
this.mayHaveDelayedTasks = true;
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
Expand Down
Loading

0 comments on commit 10cf696

Please sign in to comment.