From 7b29d1f4c599024c3913bbb67a693e32591ca53a Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 21 Sep 2023 19:17:21 -0700 Subject: [PATCH] even more work --- patches/server/0009-MC-Utils.patch | 10 ++- patches/server/0014-Timings-v2.patch | 6 +- patches/server/0016-Starlight.patch | 2 +- ...9-PlayerNaturallySpawnCreaturesEvent.patch | 2 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 6 +- .../0287-Add-PlayerConnectionCloseEvent.patch | 5 +- ...0294-Implement-Brigadier-Mojang-API.patch} | 20 +++--- ...ove-exact-choice-recipe-ingredients.patch} | 66 +++++++++---------- .../0296-Limit-Client-Sign-length-more.patch} | 12 ++-- ...e-Oversized-Tile-Entities-in-chunks.patch} | 0 ...ggleEvent-when-whitelist-is-toggled.patch} | 4 +- .../0299-Entity-getEntitySpawnReason.patch} | 20 +++--- .../0300-Fire-event-on-GS4-query.patch} | 0 ...01-Implement-PlayerPostRespawnEvent.patch} | 8 +-- ...for-pickupDelay-breaks-picking-up-i.patch} | 0 .../0303-Server-Tick-Events.patch} | 6 +- ...304-PlayerDeathEvent-getItemsToKeep.patch} | 6 +- ...Optimize-Captured-TileEntity-Lookup.patch} | 6 +- .../0306-Add-Heightmap-API.patch} | 2 +- .../0307-Mob-Spawner-API-Enhancements.patch} | 0 ...l-to-changed-postToMainThread-method.patch | 19 ++++++ ...-item-frames-are-modified-MC-123450.patch} | 0 ...0310-Implement-CraftBlockSoundGroup.patch} | 0 ...e-Keep-Spawn-Loaded-range-per-world.patch} | 16 ++--- ...12-Allow-Saving-of-Oversized-Chunks.patch} | 37 ++++------- ...13-Expose-the-internal-current-tick.patch} | 4 +- ...14-Fix-World-isChunkGenerated-calls.patch} | 30 ++++----- ...te-location-if-we-failed-to-read-it.patch} | 0 ...l-Spawned-mobs-towards-natural-spaw.patch} | 2 +- ...urable-projectile-relative-velocity.patch} | 0 .../0318-offset-item-frame-ticking.patch} | 0 .../0319-Fix-MC-158900.patch} | 4 +- ...event-consuming-the-wrong-itemstack.patch} | 8 +-- ...1-Dont-send-unnecessary-sign-update.patch} | 0 ...-option-to-disable-pillager-patrols.patch} | 0 ...323-Flat-bedrock-generator-settings.patch} | 2 +- ...k-loads-when-villagers-try-to-find-.patch} | 2 +- ...656-Fix-Follow-Range-Initial-Target.patch} | 0 .../0326-Duplicate-UUID-Resolve-Option.patch} | 16 ++--- ...ayerDeathEvent-shouldDropExperience.patch} | 4 +- ...ading-chunks-checking-hive-position.patch} | 0 ...hunks-from-Hoppers-and-other-things.patch} | 0 ...timise-EntityGetter-getPlayerByUUID.patch} | 6 +- ...331-Fix-items-not-falling-correctly.patch} | 4 +- ...l-to-changed-postToMainThread-method.patch | 19 ------ ...-Manager-and-add-advanced-packet-sup.patch | 0 46 files changed, 169 insertions(+), 185 deletions(-) rename patches/{unapplied/server/0295-Implement-Brigadier-Mojang-API.patch => server/0294-Implement-Brigadier-Mojang-API.patch} (93%) rename patches/{unapplied/server/0296-Improve-exact-choice-recipe-ingredients.patch => server/0295-Improve-exact-choice-recipe-ingredients.patch} (88%) rename patches/{unapplied/server/0297-Limit-Client-Sign-length-more.patch => server/0296-Limit-Client-Sign-length-more.patch} (81%) rename patches/{unapplied/server/0299-Handle-Oversized-Tile-Entities-in-chunks.patch => server/0297-Handle-Oversized-Tile-Entities-in-chunks.patch} (100%) rename patches/{unapplied/server/0300-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch => server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch} (82%) rename patches/{unapplied/server/0301-Entity-getEntitySpawnReason.patch => server/0299-Entity-getEntitySpawnReason.patch} (90%) rename patches/{unapplied/server/0302-Fire-event-on-GS4-query.patch => server/0300-Fire-event-on-GS4-query.patch} (100%) rename patches/{unapplied/server/0303-Implement-PlayerPostRespawnEvent.patch => server/0301-Implement-PlayerPostRespawnEvent.patch} (86%) rename patches/{unapplied/server/0304-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch => server/0302-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch} (100%) rename patches/{unapplied/server/0305-Server-Tick-Events.patch => server/0303-Server-Tick-Events.patch} (85%) rename patches/{unapplied/server/0306-PlayerDeathEvent-getItemsToKeep.patch => server/0304-PlayerDeathEvent-getItemsToKeep.patch} (92%) rename patches/{unapplied/server/0307-Optimize-Captured-TileEntity-Lookup.patch => server/0305-Optimize-Captured-TileEntity-Lookup.patch} (78%) rename patches/{unapplied/server/0308-Add-Heightmap-API.patch => server/0306-Add-Heightmap-API.patch} (95%) rename patches/{unapplied/server/0309-Mob-Spawner-API-Enhancements.patch => server/0307-Mob-Spawner-API-Enhancements.patch} (100%) create mode 100644 patches/server/0308-Fix-CB-call-to-changed-postToMainThread-method.patch rename patches/{unapplied/server/0311-Fix-sounds-when-item-frames-are-modified-MC-123450.patch => server/0309-Fix-sounds-when-item-frames-are-modified-MC-123450.patch} (100%) rename patches/{unapplied/server/0312-Implement-CraftBlockSoundGroup.patch => server/0310-Implement-CraftBlockSoundGroup.patch} (100%) rename patches/{unapplied/server/0313-Configurable-Keep-Spawn-Loaded-range-per-world.patch => server/0311-Configurable-Keep-Spawn-Loaded-range-per-world.patch} (94%) rename patches/{unapplied/server/0314-Allow-Saving-of-Oversized-Chunks.patch => server/0312-Allow-Saving-of-Oversized-Chunks.patch} (88%) rename patches/{unapplied/server/0315-Expose-the-internal-current-tick.patch => server/0313-Expose-the-internal-current-tick.patch} (83%) rename patches/{unapplied/server/0316-Fix-World-isChunkGenerated-calls.patch => server/0314-Fix-World-isChunkGenerated-calls.patch} (90%) rename patches/{unapplied/server/0317-Show-blockstate-location-if-we-failed-to-read-it.patch => server/0315-Show-blockstate-location-if-we-failed-to-read-it.patch} (100%) rename patches/{unapplied/server/0318-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => server/0316-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (94%) rename patches/{unapplied/server/0319-Configurable-projectile-relative-velocity.patch => server/0317-Configurable-projectile-relative-velocity.patch} (100%) rename patches/{unapplied/server/0320-offset-item-frame-ticking.patch => server/0318-offset-item-frame-ticking.patch} (100%) rename patches/{unapplied/server/0321-Fix-MC-158900.patch => server/0319-Fix-MC-158900.patch} (90%) rename patches/{unapplied/server/0322-Prevent-consuming-the-wrong-itemstack.patch => server/0320-Prevent-consuming-the-wrong-itemstack.patch} (88%) rename patches/{unapplied/server/0323-Dont-send-unnecessary-sign-update.patch => server/0321-Dont-send-unnecessary-sign-update.patch} (100%) rename patches/{unapplied/server/0324-Add-option-to-disable-pillager-patrols.patch => server/0322-Add-option-to-disable-pillager-patrols.patch} (100%) rename patches/{unapplied/server/0325-Flat-bedrock-generator-settings.patch => server/0323-Flat-bedrock-generator-settings.patch} (99%) rename patches/{unapplied/server/0326-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch => server/0324-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch} (91%) rename patches/{unapplied/server/0327-MC-145656-Fix-Follow-Range-Initial-Target.patch => server/0325-MC-145656-Fix-Follow-Range-Initial-Target.patch} (100%) rename patches/{unapplied/server/0328-Duplicate-UUID-Resolve-Option.patch => server/0326-Duplicate-UUID-Resolve-Option.patch} (91%) rename patches/{unapplied/server/0329-PlayerDeathEvent-shouldDropExperience.patch => server/0327-PlayerDeathEvent-shouldDropExperience.patch} (85%) rename patches/{unapplied/server/0330-Prevent-bees-loading-chunks-checking-hive-position.patch => server/0328-Prevent-bees-loading-chunks-checking-hive-position.patch} (100%) rename patches/{unapplied/server/0331-Don-t-load-Chunks-from-Hoppers-and-other-things.patch => server/0329-Don-t-load-Chunks-from-Hoppers-and-other-things.patch} (100%) rename patches/{unapplied/server/0332-Optimise-EntityGetter-getPlayerByUUID.patch => server/0330-Optimise-EntityGetter-getPlayerByUUID.patch} (90%) rename patches/{unapplied/server/0333-Fix-items-not-falling-correctly.patch => server/0331-Fix-items-not-falling-correctly.patch} (94%) delete mode 100644 patches/unapplied/server/0310-Fix-CB-call-to-changed-postToMainThread-method.patch rename patches/unapplied/{server => skipped}/0298-Optimize-Network-Manager-and-add-advanced-packet-sup.patch (100%) diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index 704ad6dada..00ab2f6b4e 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -5832,7 +5832,7 @@ index dcbbbf1d59a60abfc731d9e422c9569e8460d985..5250bf5029825524c239854db7999883 + // Paper end } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 6dc7999e0cc08efdbffafd80437f31ed590189a9..f2e5f3170a4a54e99a1dab40eb8a5c99ce548adc 100644 +index 6dc7999e0cc08efdbffafd80437f31ed590189a9..45a9977abb9abe78dafed455abaa022dfadb1153 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -167,6 +167,56 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -6056,17 +6056,15 @@ index 6dc7999e0cc08efdbffafd80437f31ed590189a9..f2e5f3170a4a54e99a1dab40eb8a5c99 } else { SectionPos sectionposition = player.getLastSectionPos(); -@@ -1190,6 +1267,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1190,6 +1267,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.distanceManager.removePlayer(sectionposition, player); } + this.removePlayerFromDistanceMaps(player); // Paper - distance maps -+ } -+ this.applyChunkTrackingView(player, ChunkTrackingView.EMPTY); } -@@ -1241,6 +1321,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1241,6 +1319,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.updateChunkTracking(player); } @@ -6074,7 +6072,7 @@ index 6dc7999e0cc08efdbffafd80437f31ed590189a9..f2e5f3170a4a54e99a1dab40eb8a5c99 } private void updateChunkTracking(ServerPlayer player) { -@@ -1493,7 +1574,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1493,7 +1572,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private class ChunkDistanceManager extends DistanceManager { protected ChunkDistanceManager(Executor workerExecutor, Executor mainThreadExecutor) { diff --git a/patches/server/0014-Timings-v2.patch b/patches/server/0014-Timings-v2.patch index a3ae1ea3c5..1e2c5a0d70 100644 --- a/patches/server/0014-Timings-v2.patch +++ b/patches/server/0014-Timings-v2.patch @@ -1010,7 +1010,7 @@ index ff3f00cf1d5180f83b16acac5676aa22cd967c8a..5aa21689e308842fe5b64689265ba45a // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index f2e5f3170a4a54e99a1dab40eb8a5c99ce548adc..c4215430a06983fbedfd21a568d79381b95696c3 100644 +index 45a9977abb9abe78dafed455abaa022dfadb1153..9932faa95dcc4f104718dbc57d36180c2bbbcb93 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1,8 +1,10 @@ @@ -1040,7 +1040,7 @@ index f2e5f3170a4a54e99a1dab40eb8a5c99ce548adc..c4215430a06983fbedfd21a568d79381 }); }, (runnable) -> { ProcessorHandle mailbox = this.mainThreadMailbox; -@@ -1459,6 +1463,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1457,6 +1461,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider List list = Lists.newArrayList(); List list1 = this.level.players(); ObjectIterator objectiterator = this.entityMap.values().iterator(); @@ -1048,7 +1048,7 @@ index f2e5f3170a4a54e99a1dab40eb8a5c99ce548adc..c4215430a06983fbedfd21a568d79381 ChunkMap.TrackedEntity playerchunkmap_entitytracker; -@@ -1483,14 +1488,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1481,14 +1486,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider playerchunkmap_entitytracker.serverEntity.sendChanges(); } } diff --git a/patches/server/0016-Starlight.patch b/patches/server/0016-Starlight.patch index 4d62d9a92c..e7364a6acb 100644 --- a/patches/server/0016-Starlight.patch +++ b/patches/server/0016-Starlight.patch @@ -4493,7 +4493,7 @@ index 5250bf5029825524c239854db7999883459f1a8a..c5cd2c2c28795593712b0de2bbaa7e38 private final DebugBuffer chunkToSaveHistory; public int oldTicketLevel; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index c4215430a06983fbedfd21a568d79381b95696c3..17182c7f130853b4b5d942e7d60adaded14f84f6 100644 +index 9932faa95dcc4f104718dbc57d36180c2bbbcb93..4c0eb0dbb5caff7944e7bdde803a9eb66d7631be 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -124,7 +124,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0169-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0169-PlayerNaturallySpawnCreaturesEvent.patch index 6f5ba94289..09c04bc1e3 100644 --- a/patches/server/0169-PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/0169-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,7 +9,7 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 17182c7f130853b4b5d942e7d60adaded14f84f6..425a0baa9321e9b484814f38fe28de3c82333443 100644 +index 4c0eb0dbb5caff7944e7bdde803a9eb66d7631be..6352e3f0a78822b4d5167a688a5230b599541159 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1193,7 +1193,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider diff --git a/patches/server/0235-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0235-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 37d8a2dc4e..9bdaa031fb 100644 --- a/patches/server/0235-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/0235-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information 1.17: Needs to be reworked for new entity storage system diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 425a0baa9321e9b484814f38fe28de3c82333443..65916397278ea0cbbc33a46e501a4b6979e6d4ef 100644 +index 6352e3f0a78822b4d5167a688a5230b599541159..62c36060989acb54eb12a145909a68193c5e3035 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1417,6 +1417,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1415,6 +1415,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas()); @@ -19,7 +19,7 @@ index 425a0baa9321e9b484814f38fe28de3c82333443..65916397278ea0cbbc33a46e501a4b69 this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); playerchunkmap_entitytracker.updatePlayers(this.level.players()); if (entity instanceof ServerPlayer) { -@@ -1459,7 +1460,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1457,7 +1458,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.broadcastRemoved(); } diff --git a/patches/server/0287-Add-PlayerConnectionCloseEvent.patch b/patches/server/0287-Add-PlayerConnectionCloseEvent.patch index 733633f48b..932a754c2c 100644 --- a/patches/server/0287-Add-PlayerConnectionCloseEvent.patch +++ b/patches/server/0287-Add-PlayerConnectionCloseEvent.patch @@ -39,10 +39,10 @@ public net.minecraft.server.network.ServerLoginPacketListenerImpl state public net.minecraft.server.network.ServerLoginPacketListenerImpl gameProfile diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index ff97e47cb248ade6530e52583b0b3865d77ace15..ed89f2f96088c5c05fd42a6795e6e6e342a0ab54 100644 +index ff97e47cb248ade6530e52583b0b3865d77ace15..62df5c51fa11f85ec2fad20c0ea5aa6241294e8a 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -632,6 +632,27 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -632,6 +632,26 @@ public class Connection extends SimpleChannelInboundHandler> { packetlistener1.onDisconnect(ichatbasecomponent); } this.pendingActions.clear(); // Free up packet queue. @@ -66,7 +66,6 @@ index ff97e47cb248ade6530e52583b0b3865d77ace15..ed89f2f96088c5c05fd42a6795e6e6e3 + } + } + // Paper end -+ } } } diff --git a/patches/unapplied/server/0295-Implement-Brigadier-Mojang-API.patch b/patches/server/0294-Implement-Brigadier-Mojang-API.patch similarity index 93% rename from patches/unapplied/server/0295-Implement-Brigadier-Mojang-API.patch rename to patches/server/0294-Implement-Brigadier-Mojang-API.patch index 1488e30829..8768a42347 100644 --- a/patches/unapplied/server/0295-Implement-Brigadier-Mojang-API.patch +++ b/patches/server/0294-Implement-Brigadier-Mojang-API.patch @@ -10,7 +10,7 @@ Adds CommandRegisteredEvent - Allows manipulating the CommandNode to add more children/metadata for the client diff --git a/build.gradle.kts b/build.gradle.kts -index ae64cbbff21ab56d27fd55a4f21b6241d0a54e98..eecadeb81317834741b083fe8c5da77519d196a3 100644 +index 7cb7a4024f53c50d88652cb6c497d815ed67c148..7f005b9a41064f1929e8d9cb53c5ab207d3a333d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,7 @@ val alsoShade: Configuration by configurations.creating @@ -59,7 +59,7 @@ index da6250df1c5f3385b683cffde47754bca4606f5e..3384501f83d445f45aa8233e98c7597d public void removeCommand(String name) { this.children.remove(name); diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index 34fdef41d1eb3fe78bf688d69aae437d89a337bb..66bd75ee66840f17cc7d00ff89adcb88d83e4dc9 100644 +index 902671a335da23d3945c363afc8abde6f5a1d444..e6bf044a0de278c568835e6150ce07ed0e39a44e 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java @@ -43,7 +43,7 @@ import net.minecraft.world.phys.Vec2; @@ -71,7 +71,7 @@ index 34fdef41d1eb3fe78bf688d69aae437d89a337bb..66bd75ee66840f17cc7d00ff89adcb88 public static final SimpleCommandExceptionType ERROR_NOT_PLAYER = new SimpleCommandExceptionType(Component.translatable("permissions.requires.player")); public static final SimpleCommandExceptionType ERROR_NOT_ENTITY = new SimpleCommandExceptionType(Component.translatable("permissions.requires.entity")); -@@ -180,6 +180,26 @@ public class CommandSourceStack implements SharedSuggestionProvider { +@@ -176,6 +176,26 @@ public class CommandSourceStack implements SharedSuggestionProvider { return this.textName; } @@ -99,10 +99,10 @@ index 34fdef41d1eb3fe78bf688d69aae437d89a337bb..66bd75ee66840f17cc7d00ff89adcb88 public boolean hasPermission(int level) { // CraftBukkit start diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index b7f1569c662df13f278fc704cabec0400ba7c382..87ce129e1d592bcf68169feb559f44d5cda7c486 100644 +index bbf4db5faf4694e78e01f4e74e277b46a02f7afd..148cfe9eac43cafee016d58a1344a97a2e69aa77 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -434,6 +434,7 @@ public class Commands { +@@ -440,6 +440,7 @@ public class Commands { bukkit.add(node.getName()); } // Paper start - Async command map building @@ -110,7 +110,7 @@ index b7f1569c662df13f278fc704cabec0400ba7c382..87ce129e1d592bcf68169feb559f44d5 net.minecraft.server.MinecraftServer.getServer().execute(() -> { runSync(player, bukkit, rootcommandnode); }); -@@ -441,6 +442,7 @@ public class Commands { +@@ -447,6 +448,7 @@ public class Commands { private void runSync(ServerPlayer player, Collection bukkit, RootCommandNode rootcommandnode) { // Paper end - Async command map building @@ -118,7 +118,7 @@ index b7f1569c662df13f278fc704cabec0400ba7c382..87ce129e1d592bcf68169feb559f44d5 PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit)); event.getPlayer().getServer().getPluginManager().callEvent(event); -@@ -459,6 +461,11 @@ public class Commands { +@@ -465,6 +467,11 @@ public class Commands { while (iterator.hasNext()) { CommandNode commandnode2 = (CommandNode) iterator.next(); @@ -131,10 +131,10 @@ index b7f1569c662df13f278fc704cabec0400ba7c382..87ce129e1d592bcf68169feb559f44d5 if (commandnode2.canUse(source)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c5b682d08ab270d153eb600afe9a21bfa1305072..6b49981d61e910d8d8fa09ff091359754e6d09a3 100644 +index 08af9c32f8cb40e1e94cfb5c42ee113e8765db86..aed6d2420afeb404b5542f19d7424b6c14d0b636 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -842,8 +842,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -732,8 +732,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl ParseResults parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack()); this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { @@ -149,7 +149,7 @@ index c5b682d08ab270d153eb600afe9a21bfa1305072..6b49981d61e910d8d8fa09ff09135975 }); }); } -@@ -858,7 +862,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -748,7 +752,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip())); } }); diff --git a/patches/unapplied/server/0296-Improve-exact-choice-recipe-ingredients.patch b/patches/server/0295-Improve-exact-choice-recipe-ingredients.patch similarity index 88% rename from patches/unapplied/server/0296-Improve-exact-choice-recipe-ingredients.patch rename to patches/server/0295-Improve-exact-choice-recipe-ingredients.patch index 60306eac24..3aa15486da 100644 --- a/patches/unapplied/server/0296-Improve-exact-choice-recipe-ingredients.patch +++ b/patches/server/0295-Improve-exact-choice-recipe-ingredients.patch @@ -143,18 +143,18 @@ index 0000000000000000000000000000000000000000..413dfa52760db393ad6a8b5341200ee7 +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.framework.qual.DefaultQualifier; diff --git a/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java b/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java -index c8e9e85728d6b60bb829e69c015ab3c5172afd54..86cc516a6d4e8c64497479ec128d4e8d73667cfa 100644 +index 4303f2b4e55191f8a53170435c6d1263782d1c8d..f5440ae9bbce231de06cf184fd0a8490cebfafde 100644 --- a/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java +++ b/src/main/java/net/minecraft/recipebook/ServerPlaceRecipe.java -@@ -33,6 +33,7 @@ public class ServerPlaceRecipe implements PlaceRecipe implements PlaceRecipe implements PlaceRecipe implements PlaceRecipe implements PlaceRecipe implements PlaceRecipe inputs, int slot, int amount, int gridX, int gridY) { Slot slot2 = this.menu.getSlot(slot); @@ -187,7 +187,7 @@ index c8e9e85728d6b60bb829e69c015ab3c5172afd54..86cc516a6d4e8c64497479ec128d4e8d } } -@@ -129,8 +141,14 @@ public class ServerPlaceRecipe implements PlaceRecipe implements PlaceRecipe { +public abstract class AbstractCookingRecipe extends io.papermc.paper.inventory.recipe.RecipeBookExactChoiceRecipe implements Recipe { // Paper - improve exact recipe choices protected final RecipeType type; - protected final ResourceLocation id; - private final CookingBookCategory category; -@@ -26,6 +26,7 @@ public abstract class AbstractCookingRecipe implements Recipe { - this.result = output; + protected final CookingBookCategory category; + protected final String group; +@@ -23,6 +23,7 @@ public abstract class AbstractCookingRecipe implements Recipe { + this.result = result; this.experience = experience; - this.cookingTime = cookTime; + this.cookingTime = cookingTime; + this.checkExactIngredients(); // Paper - improve exact recipe choices } @Override diff --git a/src/main/java/net/minecraft/world/item/crafting/Recipe.java b/src/main/java/net/minecraft/world/item/crafting/Recipe.java -index d1505698ce45bbc7f592a23111391542d01d2b28..f2cf1f30191e14c9e9b5b5e4a3f6d9346125e998 100644 +index 75ae978b577b6b2399e1476328114e94abd7d6c4..80387cd1bee2bd4c024073cee74222828f9f2c17 100644 --- a/src/main/java/net/minecraft/world/item/crafting/Recipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/Recipe.java -@@ -68,4 +68,10 @@ public interface Recipe { +@@ -65,4 +65,10 @@ public interface Recipe { } - org.bukkit.inventory.Recipe toBukkitRecipe(); // CraftBukkit + org.bukkit.inventory.Recipe toBukkitRecipe(org.bukkit.NamespacedKey id); // CraftBukkit + + // Paper start - improved exact choice recipes + default boolean hasExactIngredients() { @@ -332,10 +332,10 @@ index d1505698ce45bbc7f592a23111391542d01d2b28..f2cf1f30191e14c9e9b5b5e4a3f6d934 + // Paper end } diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java -index 9c1285e31d947f92e0b00149e342e793898e0d7c..6693dd51440da3f0fc338c4e2cb67d3222eed182 100644 +index 4430c1161c3316566158ab7286e21495edb38991..17bef91546fa85d401b263c3a69fbf464f290eca 100644 --- a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java -@@ -30,7 +30,7 @@ import org.bukkit.craftbukkit.inventory.CraftShapedRecipe; +@@ -26,7 +26,7 @@ import org.bukkit.craftbukkit.inventory.CraftShapedRecipe; import org.bukkit.inventory.RecipeChoice; // CraftBukkit end @@ -344,16 +344,16 @@ index 9c1285e31d947f92e0b00149e342e793898e0d7c..6693dd51440da3f0fc338c4e2cb67d32 final int width; final int height; -@@ -50,6 +50,7 @@ public class ShapedRecipe implements CraftingRecipe { - this.recipeItems = input; - this.result = output; +@@ -44,6 +44,7 @@ public class ShapedRecipe implements CraftingRecipe { + this.recipeItems = ingredients; + this.result = result; this.showNotification = showNotification; + this.checkExactIngredients(); // Paper - improve exact recipe choices } - public ShapedRecipe(ResourceLocation id, String group, CraftingBookCategory category, int width, int height, NonNullList input, ItemStack output) { + public ShapedRecipe(String group, CraftingBookCategory category, int width, int height, NonNullList ingredients, ItemStack result) { diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java -index 1023dcb80dfb978dd496ed0f96ca5832fadf0f87..2e60bdc44c33d434bfd9ca5bf8f75de799c6768c 100644 +index 7f78490ebf459595460ce656b9b9227e5d6b8de6..38f7d1ece27ec1a3deda21fb6a6f0e788c8ed718 100644 --- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java @@ -20,7 +20,7 @@ import org.bukkit.craftbukkit.inventory.CraftRecipe; @@ -363,17 +363,17 @@ index 1023dcb80dfb978dd496ed0f96ca5832fadf0f87..2e60bdc44c33d434bfd9ca5bf8f75de7 -public class ShapelessRecipe implements CraftingRecipe { +public class ShapelessRecipe extends io.papermc.paper.inventory.recipe.RecipeBookExactChoiceRecipe implements CraftingRecipe { // Paper - improve exact recipe choices - private final ResourceLocation id; final String group; -@@ -34,6 +34,7 @@ public class ShapelessRecipe implements CraftingRecipe { + final CraftingBookCategory category; +@@ -32,6 +32,7 @@ public class ShapelessRecipe implements CraftingRecipe { this.category = category; - this.result = output; - this.ingredients = input; + this.result = result; + this.ingredients = ingredients; + this.checkExactIngredients(); // Paper - improve exact recipe choices } // CraftBukkit start -@@ -83,6 +84,7 @@ public class ShapelessRecipe implements CraftingRecipe { +@@ -77,6 +78,7 @@ public class ShapelessRecipe implements CraftingRecipe { public boolean matches(CraftingContainer inventory, Level world) { StackedContents autorecipestackmanager = new StackedContents(); diff --git a/patches/unapplied/server/0297-Limit-Client-Sign-length-more.patch b/patches/server/0296-Limit-Client-Sign-length-more.patch similarity index 81% rename from patches/unapplied/server/0297-Limit-Client-Sign-length-more.patch rename to patches/server/0296-Limit-Client-Sign-length-more.patch index 8262e77b3a..f12ff89878 100644 --- a/patches/unapplied/server/0297-Limit-Client-Sign-length-more.patch +++ b/patches/server/0296-Limit-Client-Sign-length-more.patch @@ -22,18 +22,18 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6b49981d61e910d8d8fa09ff091359754e6d09a3..593f017a43153c081f007073926fa4f520bded00 100644 +index aed6d2420afeb404b5542f19d7424b6c14d0b636..717f23a92017a589e639c09e15377e30f602d8fe 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -302,6 +302,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -288,6 +288,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl private final MessageSignatureCache messageSignatureCache; private final FutureChain chatMessageChain; - private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit + private boolean waitingForSwitchToConfig; + private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper - public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { - this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); -@@ -3189,7 +3190,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) { + super(server, connection, clientData, player); // CraftBukkit +@@ -3044,7 +3045,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleSignUpdate(ServerboundSignUpdatePacket packet) { diff --git a/patches/unapplied/server/0299-Handle-Oversized-Tile-Entities-in-chunks.patch b/patches/server/0297-Handle-Oversized-Tile-Entities-in-chunks.patch similarity index 100% rename from patches/unapplied/server/0299-Handle-Oversized-Tile-Entities-in-chunks.patch rename to patches/server/0297-Handle-Oversized-Tile-Entities-in-chunks.patch diff --git a/patches/unapplied/server/0300-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 82% rename from patches/unapplied/server/0300-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to patches/server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index 3da6a62965..6a698f18f9 100644 --- a/patches/unapplied/server/0300-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/patches/server/0298-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 5657493e215a17f3132f9d411424875160fda6d9..e038240042366e1c491c04016982c91c91ee86cd 100644 +index 7b094b859fe4c865cd369108700d5b0d6573c019..b97ffb7746b2be70285addd091711fef0c2b1b87 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1157,6 +1157,7 @@ public abstract class PlayerList { +@@ -1151,6 +1151,7 @@ public abstract class PlayerList { } public void setUsingWhiteList(boolean whitelistEnabled) { diff --git a/patches/unapplied/server/0301-Entity-getEntitySpawnReason.patch b/patches/server/0299-Entity-getEntitySpawnReason.patch similarity index 90% rename from patches/unapplied/server/0301-Entity-getEntitySpawnReason.patch rename to patches/server/0299-Entity-getEntitySpawnReason.patch index 90e5f345a8..4db244395b 100644 --- a/patches/unapplied/server/0301-Entity-getEntitySpawnReason.patch +++ b/patches/server/0299-Entity-getEntitySpawnReason.patch @@ -22,10 +22,10 @@ index 2eddeb8d5239bbfeefbf4d3bd363f1ad083299b6..a7c89cdf20cb63792c76de81c1ff9f2c }); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6b157b362cffedae26133fc0f0af1094655ee11f..986a509998d217228eb1dc2b5815787599e02d6b 100644 +index af33e4be10c9d571eb6f7ba5730b7ed4d8647761..6978abb97da6c33099db2e4ead3f33b0ca87bed1 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1429,6 +1429,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1197,6 +1197,7 @@ public class ServerLevel extends Level implements WorldGenLevel { return true; } // Paper end @@ -34,10 +34,10 @@ index 6b157b362cffedae26133fc0f0af1094655ee11f..986a509998d217228eb1dc2b58157875 // Paper start if (DEBUG_ENTITIES) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e038240042366e1c491c04016982c91c91ee86cd..cccaf594392a0283f00986f182cc89d56181bc40 100644 +index b97ffb7746b2be70285addd091711fef0c2b1b87..3831c724dfcdf97129c6fd8dab0c7a91fa3e7679 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -233,6 +233,11 @@ public abstract class PlayerList { +@@ -225,6 +225,11 @@ public abstract class PlayerList { worldserver1 = worldserver; } @@ -47,9 +47,9 @@ index e038240042366e1c491c04016982c91c91ee86cd..cccaf594392a0283f00986f182cc89d5 + } + // Paper end player.setServerLevel(worldserver1); - String s1 = "local"; + String s1 = connection.getLoggableAddress(this.server.logIPs()); -@@ -373,7 +378,7 @@ public abstract class PlayerList { +@@ -356,7 +361,7 @@ public abstract class PlayerList { // CraftBukkit start ServerLevel finalWorldServer = worldserver1; Entity entity = EntityType.loadEntityRecursive(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> { @@ -59,7 +59,7 @@ index e038240042366e1c491c04016982c91c91ee86cd..cccaf594392a0283f00986f182cc89d5 }); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index dee47ff97e4f08154866d7628c3588a42f9892b9..0f40361ebfe64fae828f577529200e40e94b0e05 100644 +index d0779d38c56ca1c01abd154720d2865d14479a30..7c23f63fd642002cac597da2eafc5f0b4232d5a4 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -234,6 +234,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -70,7 +70,7 @@ index dee47ff97e4f08154866d7628c3588a42f9892b9..0f40361ebfe64fae828f577529200e40 public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; -@@ -2181,6 +2182,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2137,6 +2138,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); } @@ -80,7 +80,7 @@ index dee47ff97e4f08154866d7628c3588a42f9892b9..0f40361ebfe64fae828f577529200e40 // Save entity's from mob spawner status if (spawnedViaMobSpawner) { nbt.putBoolean("Paper.FromMobSpawner", true); -@@ -2327,6 +2331,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2283,6 +2287,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -120,7 +120,7 @@ index a9be524edb03c51300bc45d424fcf87c7491a8c0..a08c2dee792da1a54005f0a65a9eefab // CraftBukkit start if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 185b3af59bf72244bbbfc46c3336e4f7f14e73a8..4dc676f29f04ba8d52b2fe3778347d2c2f46eebe 100644 +index 0fd9119c710afdd46a60d81ae3f9ce5da88d2541..c7cd18de51c5e7c9d194ba65902084194d4408ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1307,5 +1307,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/unapplied/server/0302-Fire-event-on-GS4-query.patch b/patches/server/0300-Fire-event-on-GS4-query.patch similarity index 100% rename from patches/unapplied/server/0302-Fire-event-on-GS4-query.patch rename to patches/server/0300-Fire-event-on-GS4-query.patch diff --git a/patches/unapplied/server/0303-Implement-PlayerPostRespawnEvent.patch b/patches/server/0301-Implement-PlayerPostRespawnEvent.patch similarity index 86% rename from patches/unapplied/server/0303-Implement-PlayerPostRespawnEvent.patch rename to patches/server/0301-Implement-PlayerPostRespawnEvent.patch index 410baaf9d7..349aa918ff 100644 --- a/patches/unapplied/server/0303-Implement-PlayerPostRespawnEvent.patch +++ b/patches/server/0301-Implement-PlayerPostRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index cccaf594392a0283f00986f182cc89d56181bc40..94a0d17a0339249c1c97e36d6e13b5958cfa2e49 100644 +index 3831c724dfcdf97129c6fd8dab0c7a91fa3e7679..3c4224472ce59d7a2c1748d510e4fc8f58a7d5e1 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -758,9 +758,14 @@ public abstract class PlayerList { +@@ -753,9 +753,14 @@ public abstract class PlayerList { boolean flag2 = false; @@ -24,7 +24,7 @@ index cccaf594392a0283f00986f182cc89d56181bc40..94a0d17a0339249c1c97e36d6e13b595 ServerLevel worldserver1 = this.server.getLevel(entityplayer.getRespawnDimension()); if (worldserver1 != null) { Optional optional; -@@ -812,6 +817,7 @@ public abstract class PlayerList { +@@ -807,6 +812,7 @@ public abstract class PlayerList { location = respawnEvent.getRespawnLocation(); if (!flag) entityplayer.reset(); // SPIGOT-4785 @@ -32,7 +32,7 @@ index cccaf594392a0283f00986f182cc89d56181bc40..94a0d17a0339249c1c97e36d6e13b595 } else { location.setWorld(worldserver.getWorld()); } -@@ -871,6 +877,13 @@ public abstract class PlayerList { +@@ -865,6 +871,13 @@ public abstract class PlayerList { if (entityplayer.connection.isDisconnected()) { this.save(entityplayer); } diff --git a/patches/unapplied/server/0304-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/patches/server/0302-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 100% rename from patches/unapplied/server/0304-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to patches/server/0302-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch diff --git a/patches/unapplied/server/0305-Server-Tick-Events.patch b/patches/server/0303-Server-Tick-Events.patch similarity index 85% rename from patches/unapplied/server/0305-Server-Tick-Events.patch rename to patches/server/0303-Server-Tick-Events.patch index 5da18cda5f..c08c011b0c 100644 --- a/patches/unapplied/server/0305-Server-Tick-Events.patch +++ b/patches/server/0303-Server-Tick-Events.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d84ed437e91a620c294533ddcb098cc11bc16c1f..78465f82b2f3ae2a932b787a489f3d01cc51f5f9 100644 +index bace1ff9e64bd8bec334c5e1d1fd1c621a63cd92..8ce9b9444c46956eeace333206eefd3ebca1e0c0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1304,6 +1304,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop +Date: Fri, 10 May 2019 18:38:19 +0100 +Subject: [PATCH] Fix CB call to changed postToMainThread method + + +diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +index 988820d6041f3784fec9321c7bc08e2e84a52ad5..d1808bf9dc19fad84da5eb3b4c3d549bc624b00a 100644 +--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +@@ -297,7 +297,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + + Objects.requireNonNull(this.connection); + // CraftBukkit - Don't wait +- minecraftserver.wrapRunnable(networkmanager::handleDisconnection); ++ minecraftserver.scheduleOnMain(networkmanager::handleDisconnection); // Paper + } + + protected boolean isSingleplayerOwner() { diff --git a/patches/unapplied/server/0311-Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/patches/server/0309-Fix-sounds-when-item-frames-are-modified-MC-123450.patch similarity index 100% rename from patches/unapplied/server/0311-Fix-sounds-when-item-frames-are-modified-MC-123450.patch rename to patches/server/0309-Fix-sounds-when-item-frames-are-modified-MC-123450.patch diff --git a/patches/unapplied/server/0312-Implement-CraftBlockSoundGroup.patch b/patches/server/0310-Implement-CraftBlockSoundGroup.patch similarity index 100% rename from patches/unapplied/server/0312-Implement-CraftBlockSoundGroup.patch rename to patches/server/0310-Implement-CraftBlockSoundGroup.patch diff --git a/patches/unapplied/server/0313-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/0311-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 94% rename from patches/unapplied/server/0313-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to patches/server/0311-Configurable-Keep-Spawn-Loaded-range-per-world.patch index b5af090c02..3fc5d96721 100644 --- a/patches/unapplied/server/0313-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/patches/server/0311-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 78465f82b2f3ae2a932b787a489f3d01cc51f5f9..21d7196cdc694a581c8a3232a39e7454c0b30f56 100644 +index 8ce9b9444c46956eeace333206eefd3ebca1e0c0..5b274f766e8cf55151ac6499fa1a68b9a0816b57 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -737,30 +737,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> readChunk(ChunkPos chunkPos) { - return this.read(chunkPos).thenApplyAsync((optional) -> { @@ -28,7 +28,7 @@ index af92411006c3d281815b3f4c3de5f0280d3a5901..50a201c08f143117a050305b0dde6873 } // CraftBukkit start -@@ -698,6 +702,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1183,6 +1187,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // CraftBukkit end } @@ -93,11 +93,11 @@ index af92411006c3d281815b3f4c3de5f0280d3a5901..50a201c08f143117a050305b0dde6873 // Spigot start return this.anyPlayerCloseEnoughForSpawning(pos, false); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index 584985272a02eb5b61a22cf2404fbd97a55a3358..cda87a66fe80bf910f629c64e36c1fecbad81d77 100644 +index bbf84e05d8c2ac5ad8e3837756421b6bda65f91c..13ab2d2d8d0d3ab0facbae8285b09267765cc97d 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -@@ -51,6 +51,30 @@ public class RegionFile implements AutoCloseable { - public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper +@@ -50,6 +50,30 @@ public class RegionFile implements AutoCloseable { + protected final RegionBitmap usedSectors; public final Path regionFile; // Paper + // Paper start - Cache chunk status @@ -127,7 +127,7 @@ index 584985272a02eb5b61a22cf2404fbd97a55a3358..cda87a66fe80bf910f629c64e36c1fec public RegionFile(Path file, Path directory, boolean dsync) throws IOException { this(file, directory, RegionFileVersion.VERSION_DEFLATE, dsync); } -@@ -398,6 +422,7 @@ public class RegionFile implements AutoCloseable { +@@ -397,11 +421,13 @@ public class RegionFile implements AutoCloseable { return this.getOffset(pos) != 0; } @@ -135,19 +135,17 @@ index 584985272a02eb5b61a22cf2404fbd97a55a3358..cda87a66fe80bf910f629c64e36c1fec private static int getOffsetIndex(ChunkPos pos) { return pos.getRegionLocalX() + pos.getRegionLocalZ() * 32; } -@@ -408,6 +433,7 @@ public class RegionFile implements AutoCloseable { - synchronized (this) { - try { - // Paper end + + public void close() throws IOException { + this.closed = true; // Paper try { this.padToFullSector(); } finally { 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 96f129cb13642dc9667464b58c025fa0ed700cfd..29da08c58200c24fd03003937d30eb41234cabc9 100644 +index e7aa20ec84fcbe74ca2a1a11697e083d713d6a1a..390569f89b21c375357fb71d7b7730f0ea789545 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 -@@ -290,6 +290,7 @@ public class RegionFileStorage implements AutoCloseable { +@@ -212,6 +212,7 @@ public final class RegionFileStorage implements AutoCloseable { try { NbtIo.write(nbt, (DataOutput) dataoutputstream); @@ -156,7 +154,7 @@ index 96f129cb13642dc9667464b58c025fa0ed700cfd..29da08c58200c24fd03003937d30eb41 } catch (Throwable throwable) { if (dataoutputstream != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e0f38ef295e1958b45fc05395cd4c57194928338..f259f6609cd87a210451ddf4ea00a72718d1efd0 100644 +index d9d327326f5fbf861f7b8ab6120ca2f2e8c8b360..b266cd21fec4c48d2fc4676eb30b1bfdaa4acd98 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -307,9 +307,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -185,7 +183,7 @@ index e0f38ef295e1958b45fc05395cd4c57194928338..f259f6609cd87a210451ddf4ea00a727 throw new RuntimeException(ex); } } -@@ -423,20 +437,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -420,20 +434,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/patches/unapplied/server/0317-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0315-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 100% rename from patches/unapplied/server/0317-Show-blockstate-location-if-we-failed-to-read-it.patch rename to patches/server/0315-Show-blockstate-location-if-we-failed-to-read-it.patch diff --git a/patches/unapplied/server/0318-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/0316-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 94% rename from patches/unapplied/server/0318-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to patches/server/0316-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index 47ca599bec..239e4cf974 100644 --- a/patches/unapplied/server/0318-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/patches/server/0316-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -17,7 +17,7 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 2503d4691e47083a9d99a38c4ed3f50a2374821a..23d53f3fd524cc4d827dc95ab95367702a110a05 100644 +index 9ed7abddf30d298a5abb04974efd1b470d015b09..fe38079d69f3e9987ad5ab077ae09d05017a681a 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -88,6 +88,13 @@ public final class NaturalSpawner { diff --git a/patches/unapplied/server/0319-Configurable-projectile-relative-velocity.patch b/patches/server/0317-Configurable-projectile-relative-velocity.patch similarity index 100% rename from patches/unapplied/server/0319-Configurable-projectile-relative-velocity.patch rename to patches/server/0317-Configurable-projectile-relative-velocity.patch diff --git a/patches/unapplied/server/0320-offset-item-frame-ticking.patch b/patches/server/0318-offset-item-frame-ticking.patch similarity index 100% rename from patches/unapplied/server/0320-offset-item-frame-ticking.patch rename to patches/server/0318-offset-item-frame-ticking.patch diff --git a/patches/unapplied/server/0321-Fix-MC-158900.patch b/patches/server/0319-Fix-MC-158900.patch similarity index 90% rename from patches/unapplied/server/0321-Fix-MC-158900.patch rename to patches/server/0319-Fix-MC-158900.patch index daca6f31cc..940a0d08ca 100644 --- a/patches/unapplied/server/0321-Fix-MC-158900.patch +++ b/patches/server/0319-Fix-MC-158900.patch @@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 94a0d17a0339249c1c97e36d6e13b5958cfa2e49..2848e657209a699b12fc0e1fd2bde54d661f07f0 100644 +index 3c4224472ce59d7a2c1748d510e4fc8f58a7d5e1..b4ded40387006821433db1de85ed1c2347757155 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -642,8 +642,10 @@ public abstract class PlayerList { +@@ -629,8 +629,10 @@ public abstract class PlayerList { Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress()); diff --git a/patches/unapplied/server/0322-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0320-Prevent-consuming-the-wrong-itemstack.patch similarity index 88% rename from patches/unapplied/server/0322-Prevent-consuming-the-wrong-itemstack.patch rename to patches/server/0320-Prevent-consuming-the-wrong-itemstack.patch index f9a465a007..74400336b9 100644 --- a/patches/unapplied/server/0322-Prevent-consuming-the-wrong-itemstack.patch +++ b/patches/server/0320-Prevent-consuming-the-wrong-itemstack.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 965c5724eb4927f017123c791c4a721c59b6db15..53abf88143206eee03f372cf6471fbfbe519496d 100644 +index 0f7f90a6b358402c7a05217f59768448eabfce53..ac59a1e5ae4fe84af44220d721b60f2e157e0f1f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3651,9 +3651,14 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3710,9 +3710,14 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void startUsingItem(InteractionHand hand) { @@ -24,7 +24,7 @@ index 965c5724eb4927f017123c791c4a721c59b6db15..53abf88143206eee03f372cf6471fbfb this.useItem = itemstack; this.useItemRemaining = itemstack.getUseDuration(); if (!this.level().isClientSide) { -@@ -3733,6 +3738,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3792,6 +3797,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.releaseUsingItem(); } else { if (!this.useItem.isEmpty() && this.isUsingItem()) { @@ -32,7 +32,7 @@ index 965c5724eb4927f017123c791c4a721c59b6db15..53abf88143206eee03f372cf6471fbfb this.triggerItemUseEffects(this.useItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; -@@ -3767,8 +3773,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3826,8 +3832,8 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.stopUsingItem(); diff --git a/patches/unapplied/server/0323-Dont-send-unnecessary-sign-update.patch b/patches/server/0321-Dont-send-unnecessary-sign-update.patch similarity index 100% rename from patches/unapplied/server/0323-Dont-send-unnecessary-sign-update.patch rename to patches/server/0321-Dont-send-unnecessary-sign-update.patch diff --git a/patches/unapplied/server/0324-Add-option-to-disable-pillager-patrols.patch b/patches/server/0322-Add-option-to-disable-pillager-patrols.patch similarity index 100% rename from patches/unapplied/server/0324-Add-option-to-disable-pillager-patrols.patch rename to patches/server/0322-Add-option-to-disable-pillager-patrols.patch diff --git a/patches/unapplied/server/0325-Flat-bedrock-generator-settings.patch b/patches/server/0323-Flat-bedrock-generator-settings.patch similarity index 99% rename from patches/unapplied/server/0325-Flat-bedrock-generator-settings.patch rename to patches/server/0323-Flat-bedrock-generator-settings.patch index d745373918..07b87e77ed 100644 --- a/patches/unapplied/server/0325-Flat-bedrock-generator-settings.patch +++ b/patches/server/0323-Flat-bedrock-generator-settings.patch @@ -126,7 +126,7 @@ index c887d34171f89c731d76c4ca92c70be2b1edc1e6..df6752b5c77bc88a4fcf1ffe918b24d4 }); // Paper end diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java -index 902156477bdfc9917105f1229f760c26e5af302a..58609a0911c4e32b6f80f050cd3d23f70ad75b1b 100644 +index 54308f1decc3982f30bf8b7a8a9d8865bfdbb9fd..0fca35ac82a1854260980b7c2664be82033e3bad 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java @@ -207,7 +207,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { diff --git a/patches/unapplied/server/0326-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/patches/server/0324-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 91% rename from patches/unapplied/server/0326-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to patches/server/0324-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch index 7e151eb18d..1bf426b9ec 100644 --- a/patches/unapplied/server/0326-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch +++ b/patches/server/0324-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent sync chunk loads when villagers try to find beds diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java b/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java -index 9012a6347b2f061e88c42d3c237c4b465883e941..6b2b34cb129f807af8042e26a5e180d18e195459 100644 +index 964fc8615d071d33c821f0c54ac1ebd4884df0cd..dcfc668503c50927b4a4dbb3988d531215d513f8 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java @@ -43,7 +43,8 @@ public class SleepInBed extends Behavior { diff --git a/patches/unapplied/server/0327-MC-145656-Fix-Follow-Range-Initial-Target.patch b/patches/server/0325-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 100% rename from patches/unapplied/server/0327-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to patches/server/0325-MC-145656-Fix-Follow-Range-Initial-Target.patch diff --git a/patches/unapplied/server/0328-Duplicate-UUID-Resolve-Option.patch b/patches/server/0326-Duplicate-UUID-Resolve-Option.patch similarity index 91% rename from patches/unapplied/server/0328-Duplicate-UUID-Resolve-Option.patch rename to patches/server/0326-Duplicate-UUID-Resolve-Option.patch index d77f545ded..fb47e2a292 100644 --- a/patches/unapplied/server/0328-Duplicate-UUID-Resolve-Option.patch +++ b/patches/server/0326-Duplicate-UUID-Resolve-Option.patch @@ -33,10 +33,10 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java -index 8f7bf1f0400aeab8b7801d113d244d0716c5eb84..fccb8d7a99bef076838ebefa233f2f00a1364c30 100644 +index 95eac2e12a16938d81ab512b00e90c5234b42834..9aea7de906103e4a8dcbcac397cc05ce1abb4aa2 100644 --- a/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java +++ b/src/main/java/io/papermc/paper/chunk/system/ChunkSystem.java -@@ -74,7 +74,17 @@ public final class ChunkSystem { +@@ -224,7 +224,17 @@ public final class ChunkSystem { } public static void onEntityPreAdd(final ServerLevel level, final Entity entity) { @@ -56,10 +56,10 @@ index 8f7bf1f0400aeab8b7801d113d244d0716c5eb84..fccb8d7a99bef076838ebefa233f2f00 public static void onChunkHolderCreate(final ServerLevel level, final ChunkHolder holder) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 50a201c08f143117a050305b0dde6873a04efb8b..562e45954cc72a253f20e9a9fddf0f179baf3e7b 100644 +index a0fba2202b2060694485989094f7e6e4ab94caaa..66046c763872a031c65db17502b33199a40fd093 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -535,6 +535,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -870,6 +870,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.discard(); needsRemoval = true; } @@ -67,8 +67,8 @@ index 50a201c08f143117a050305b0dde6873a04efb8b..562e45954cc72a253f20e9a9fddf0f17 return !needsRemoval; })); // CraftBukkit end -@@ -546,6 +547,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - throw new UnsupportedOperationException(); // Paper - rewrite chunk system +@@ -920,6 +921,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + }); } + // Paper start @@ -115,5 +115,5 @@ index 50a201c08f143117a050305b0dde6873a04efb8b..562e45954cc72a253f20e9a9fddf0f17 + } + // Paper end public CompletableFuture> prepareTickingChunk(ChunkHolder holder) { - throw new UnsupportedOperationException(); // Paper - rewrite chunk system - } + CompletableFuture, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> { + return ChunkStatus.FULL; diff --git a/patches/unapplied/server/0329-PlayerDeathEvent-shouldDropExperience.patch b/patches/server/0327-PlayerDeathEvent-shouldDropExperience.patch similarity index 85% rename from patches/unapplied/server/0329-PlayerDeathEvent-shouldDropExperience.patch rename to patches/server/0327-PlayerDeathEvent-shouldDropExperience.patch index a3a59d2c10..7af94b1b12 100644 --- a/patches/unapplied/server/0329-PlayerDeathEvent-shouldDropExperience.patch +++ b/patches/server/0327-PlayerDeathEvent-shouldDropExperience.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3ebb5cd3a0068cf6716ebe6fa6f4f4f4a1d58d08..4aea5b2e36f5cd6f9b076f9a225a391211ec0c25 100644 +index e66d24174d5834cb9526fa4a238d0765bef827b2..394f2b87010454ff2e4898f3ee5085c68d91952a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -967,7 +967,7 @@ public class ServerPlayer extends Player { +@@ -926,7 +926,7 @@ public class ServerPlayer extends Player { this.tellNeutralMobsThatIDied(); } // SPIGOT-5478 must be called manually now diff --git a/patches/unapplied/server/0330-Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/0328-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from patches/unapplied/server/0330-Prevent-bees-loading-chunks-checking-hive-position.patch rename to patches/server/0328-Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/patches/unapplied/server/0331-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/patches/server/0329-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from patches/unapplied/server/0331-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to patches/server/0329-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/patches/unapplied/server/0332-Optimise-EntityGetter-getPlayerByUUID.patch b/patches/server/0330-Optimise-EntityGetter-getPlayerByUUID.patch similarity index 90% rename from patches/unapplied/server/0332-Optimise-EntityGetter-getPlayerByUUID.patch rename to patches/server/0330-Optimise-EntityGetter-getPlayerByUUID.patch index 23d9cd2d02..ed3f293f2f 100644 --- a/patches/unapplied/server/0332-Optimise-EntityGetter-getPlayerByUUID.patch +++ b/patches/server/0330-Optimise-EntityGetter-getPlayerByUUID.patch @@ -6,12 +6,12 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID Use the PlayerList map instead of iterating over all players diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 773fea9c2c4bef931439b5663471c010d9a1297c..0efc377743e93a0120843cab192753d037e88a73 100644 +index 74bddd7f37af06355549128bb0bfc1d7eedd2bb8..0b928a1cf86de9c83fd50472226be48443ed65a6 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -550,6 +550,15 @@ public class ServerLevel extends Level implements WorldGenLevel { - }); +@@ -326,6 +326,15 @@ public class ServerLevel extends Level implements WorldGenLevel { } + // Paper end + // Paper start - optimise getPlayerByUUID + @Nullable diff --git a/patches/unapplied/server/0333-Fix-items-not-falling-correctly.patch b/patches/server/0331-Fix-items-not-falling-correctly.patch similarity index 94% rename from patches/unapplied/server/0333-Fix-items-not-falling-correctly.patch rename to patches/server/0331-Fix-items-not-falling-correctly.patch index db8b4a2a96..86f295faf5 100644 --- a/patches/unapplied/server/0333-Fix-items-not-falling-correctly.patch +++ b/patches/server/0331-Fix-items-not-falling-correctly.patch @@ -28,10 +28,10 @@ index fda34d93a5b75919c840d3bc0efa0651e5eb4843..cecd7bd4a6dd66cfb2d632a232ff469e float f1 = 0.98F; diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 1d9ce6dae17ff572d4528971c69c63d0f85b313c..305d9772f2af22e8bdf73235cdb15ea01ac2c3b3 100644 +index d9149580408094784794bc0575a00bebe2e7b4d4..5d470b424d52ae402ec0e950263ad54cf6f7e3ef 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -257,7 +257,7 @@ public class ActivationRange +@@ -251,7 +251,7 @@ public class ActivationRange isActive = true; } // Add a little performance juice to active entities. Skip 1/4 if not immune. diff --git a/patches/unapplied/server/0310-Fix-CB-call-to-changed-postToMainThread-method.patch b/patches/unapplied/server/0310-Fix-CB-call-to-changed-postToMainThread-method.patch deleted file mode 100644 index 546cc90740..0000000000 --- a/patches/unapplied/server/0310-Fix-CB-call-to-changed-postToMainThread-method.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Fri, 10 May 2019 18:38:19 +0100 -Subject: [PATCH] Fix CB call to changed postToMainThread method - - -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 593f017a43153c081f007073926fa4f520bded00..732238a60dacd83b6572f6f79763f112e5fe9611 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -517,7 +517,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - - Objects.requireNonNull(this.connection); - // CraftBukkit - Don't wait -- minecraftserver.wrapRunnable(networkmanager::handleDisconnection); -+ minecraftserver.scheduleOnMain(networkmanager::handleDisconnection); // Paper - } - - private CompletableFuture filterTextPacket(T text, BiFunction> filterer) { diff --git a/patches/unapplied/server/0298-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/patches/unapplied/skipped/0298-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 100% rename from patches/unapplied/server/0298-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to patches/unapplied/skipped/0298-Optimize-Network-Manager-and-add-advanced-packet-sup.patch