diff --git a/patches/server/0646-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0646-Fix-and-optimise-world-force-upgrading.patch index 930bcbd61d..b0c26ac732 100644 --- a/patches/server/0646-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/0646-Fix-and-optimise-world-force-upgrading.patch @@ -244,7 +244,7 @@ index 0000000000000000000000000000000000000000..ca4e9acb4b7beb739546954d0aa02461 + } +} diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 9ebfa8c8a3fc1299e513efd467c562459f2684e7..8beb378536d87047fda50d365f49c3ff64d7497f 100644 +index 9ebfa8c8a3fc1299e513efd467c562459f2684e7..1e9ff7ecd03a4202376884104570ab56f4226a97 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -16,6 +16,7 @@ import java.util.Objects; @@ -263,7 +263,7 @@ index 9ebfa8c8a3fc1299e513efd467c562459f2684e7..8beb378536d87047fda50d365f49c3ff + public static void convertWorldButItWorks(net.minecraft.resources.ResourceKey dimensionType, net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess worldSession, + DataFixer dataFixer, Optional>> generatorKey, boolean removeCaches) { + int threads = Runtime.getRuntime().availableProcessors() * 3 / 8; -+ final ThreadedWorldUpgrader worldUpgrader = new ThreadedWorldUpgrader(dimensionType, worldSession.getLevelId(), worldSession.levelPath.toFile(), threads, dataFixer, generatorKey, removeCaches); ++ final ThreadedWorldUpgrader worldUpgrader = new ThreadedWorldUpgrader(dimensionType, worldSession.getLevelId(), worldSession.levelDirectory.path().toFile(), threads, dataFixer, generatorKey, removeCaches); + worldUpgrader.convert(); + } + // Paper end - fix and optimise world upgrading @@ -303,7 +303,7 @@ index 3b950c0a6a660d5d9b957cfc08d85fc2bdb706e4..6693a1861a775b755aa06844a37753ba if (dimensionKey == LevelStem.OVERWORLD) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 23ae163fa08311d2b41dfeafd9df32bebcc04152..474b1dc68e138fb3fcca8c846d50fa2c04f74fd5 100644 +index c2315b4eb3d62c01f117e4f00b2280114f0945f9..c22e6e9d043f9afcb8c2fe24e9edd180304930dc 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -178,6 +178,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0674-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0674-Fix-commands-from-signs-not-firing-command-events.patch index b8d64f53d5..ebdb686959 100644 --- a/patches/server/0674-Fix-commands-from-signs-not-firing-command-events.patch +++ b/patches/server/0674-Fix-commands-from-signs-not-firing-command-events.patch @@ -25,7 +25,7 @@ index 1ae2e1599cb5b8612ca5b45c37367377d7f26dbf..0731dcc367b621b18c2435db053645e9 } diff --git a/src/main/java/io/papermc/paper/commands/DelegatingCommandSource.java b/src/main/java/io/papermc/paper/commands/DelegatingCommandSource.java new file mode 100644 -index 0000000000000000000000000000000000000000..1f6747d7a4c33f0ee7b0dc2120081bb87a855d35 +index 0000000000000000000000000000000000000000..01a2bc1feec808790bb93618ce46adb9bea5a9c8 --- /dev/null +++ b/src/main/java/io/papermc/paper/commands/DelegatingCommandSource.java @@ -0,0 +1,42 @@ @@ -47,8 +47,8 @@ index 0000000000000000000000000000000000000000..1f6747d7a4c33f0ee7b0dc2120081bb8 + } + + @Override -+ public void sendMessage(Component message, UUID sender) { -+ delegate.sendMessage(message, sender); ++ public void sendSystemMessage(Component message) { ++ delegate.sendSystemMessage(message); + } + + @Override @@ -72,7 +72,7 @@ index 0000000000000000000000000000000000000000..1f6747d7a4c33f0ee7b0dc2120081bb8 + } +} diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 831db5ee21938d71e99bf9d17b92a6ca15531740..d7ecd6c7d28f88d67430bee6b586307fda98a92e 100644 +index 831db5ee21938d71e99bf9d17b92a6ca15531740..517f9c6df4427f21ebac17a298a57e28d53e6fd0 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java @@ -40,6 +40,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C @@ -108,8 +108,8 @@ index 831db5ee21938d71e99bf9d17b92a6ca15531740..d7ecd6c7d28f88d67430bee6b586307f + // Paper start - send messages back to the player + CommandSource commandSource = this.level.paperConfig.showSignClickCommandFailureMessagesToPlayer ? new io.papermc.paper.commands.DelegatingCommandSource(this) { + @Override -+ public void sendMessage(Component message, UUID sender) { -+ player.sendMessage(message, sender); ++ public void sendSystemMessage(Component message) { ++ player.sendSystemMessage(message); + } + + @Override diff --git a/patches/server/0701-Add-BlockBreakBlockEvent.patch b/patches/server/0701-Add-BlockBreakBlockEvent.patch index fca175efa3..117e5f65af 100644 --- a/patches/server/0701-Add-BlockBreakBlockEvent.patch +++ b/patches/server/0701-Add-BlockBreakBlockEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockBreakBlockEvent diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 5eff2180dba05c29fb0a653caea695fa1b50e0a0..fea6866b769c6cf2975b04a843018724a73e5752 100644 +index 5eff2180dba05c29fb0a653caea695fa1b50e0a0..218ecfad4322e60274f9d9b14e32aa2b155b1bc5 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -333,6 +333,23 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -24,7 +24,7 @@ index 5eff2180dba05c29fb0a653caea695fa1b50e0a0..fea6866b769c6cf2975b04a843018724 + for (var drop : event.getDrops()) { + popResource(world.getMinecraftWorld(), pos, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(drop)); + } -+ state.spawnAfterBreak(world.getMinecraftWorld(), pos, ItemStack.EMPTY); ++ state.spawnAfterBreak(world.getMinecraftWorld(), pos, ItemStack.EMPTY, true); + } + return true; + }