From 2efd9bb99f2fcefd99f04b85048373905d496581 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Tue, 5 Dec 2023 20:54:55 +0100 Subject: [PATCH] More more more work --- ...urable-Disabling-Cat-Chest-Detection.patch | 4 +-- ...052-Improve-Player-chat-API-handling.patch | 14 ++++---- ...chunks-are-slime-spawn-chunks-toggle.patch | 14 ++++---- .../0054-Expose-server-CommandMap.patch | 4 +-- ...e-informative-in-maxHealth-exception.patch | 4 +-- .../0056-Player-Tab-List-and-Title-APIs.patch | 14 ++++---- ...dd-configurable-portal-search-radius.patch | 4 +-- .../server/0058-Add-velocity-warnings.patch | 8 ++--- ...ble-inter-world-teleportation-safety.patch | 4 +-- .../0060-Add-exception-reporting-event.patch | 12 +++---- ...reboards-for-non-players-by-default.patch} | 10 +++--- ...orking-with-arrows-stuck-in-living-.patch} | 6 ++-- .../0063-Chunk-Save-Reattempt.patch} | 0 .../0064-Complete-resource-pack-API.patch} | 14 ++++---- ...ding-permissions.yml-before-plugins.patch} | 6 ++-- ...low-Reloading-of-Custom-Permissions.patch} | 4 +-- .../0067-Remove-Metadata-on-reload.patch} | 4 +-- ...68-Handle-Item-Meta-Inconsistencies.patch} | 36 +++++++++---------- ...rable-Non-Player-Arrow-Despawn-Rate.patch} | 4 +-- .../0070-Add-World-Util-Methods.patch} | 8 ++--- ...-Custom-replacement-for-eaten-items.patch} | 8 ++--- ...ing-for-EntityLiving-hasLineOfSight.patch} | 8 ++--- ...h-absorb-values-and-repair-bad-data.patch} | 12 +++---- ...74-Use-a-Shared-Random-for-Entities.patch} | 6 ++-- ...e-spawn-chances-for-skeleton-horses.patch} | 4 +-- ...dBounds-and-getBlockState-for-inlin.patch} | 4 +-- ...kPhysicsEvent-if-a-plugin-has-a-lis.patch} | 22 ++++++------ ...ntity-AddTo-RemoveFrom-World-Events.patch} | 6 ++-- ...9-Configurable-Chunk-Inhabited-Time.patch} | 0 .../0080-EntityPathfindEvent.patch} | 0 ...gionFileCache-and-make-configurable.patch} | 0 ...-Do-not-load-chunks-for-Pathfinding.patch} | 8 ++--- ...083-Add-PlayerUseUnknownEntityEvent.patch} | 4 +-- ...urable-random-tick-rates-for-blocks.patch} | 12 +++---- ...-BlockPlaceEvent-triggering-physics.patch} | 4 +-- .../0086-Optimize-DataBits.patch} | 0 ...illa-per-world-scoreboard-coloring-.patch} | 0 .../0088-Configurable-Player-Collision.patch} | 24 ++++++------- ...nt-to-allow-plugins-to-handle-clien.patch} | 0 .../0090-Configurable-RCON-IP-address.patch} | 8 ++--- ...tyRegainHealthEvent-isFastRegen-API.patch} | 4 +-- ...to-configure-frosted_ice-properties.patch} | 6 ++-- ...possibility-for-getServer-singleton.patch} | 8 ++--- ...tem-frames-performance-and-bug-fixe.patch} | 8 ++--- ...-scoreboard-teams-to-scoreboard.dat.patch} | 4 +-- ...-don-t-need-to-when-cerealising-text.patch | 35 ------------------ 46 files changed, 167 insertions(+), 202 deletions(-) rename patches/{unapplied => }/server/0051-Configurable-Disabling-Cat-Chest-Detection.patch (87%) rename patches/{unapplied => }/server/0052-Improve-Player-chat-API-handling.patch (88%) rename patches/{unapplied => }/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch (73%) rename patches/{unapplied => }/server/0054-Expose-server-CommandMap.patch (78%) rename patches/{unapplied => }/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch (89%) rename patches/{unapplied => }/server/0056-Player-Tab-List-and-Title-APIs.patch (91%) rename patches/{unapplied => }/server/0057-Add-configurable-portal-search-radius.patch (93%) rename patches/{unapplied => }/server/0058-Add-velocity-warnings.patch (93%) rename patches/{unapplied => }/server/0059-Configurable-inter-world-teleportation-safety.patch (91%) rename patches/{unapplied => }/server/0060-Add-exception-reporting-event.patch (96%) rename patches/{unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch => server/0061-Disable-Scoreboards-for-non-players-by-default.patch} (81%) rename patches/{unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch => server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch} (87%) rename patches/{unapplied/server/0064-Chunk-Save-Reattempt.patch => server/0063-Chunk-Save-Reattempt.patch} (100%) rename patches/{unapplied/server/0065-Complete-resource-pack-API.patch => server/0064-Complete-resource-pack-API.patch} (87%) rename patches/{unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch => server/0065-Default-loading-permissions.yml-before-plugins.patch} (89%) rename patches/{unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch => server/0066-Allow-Reloading-of-Custom-Permissions.patch} (90%) rename patches/{unapplied/server/0068-Remove-Metadata-on-reload.patch => server/0067-Remove-Metadata-on-reload.patch} (88%) rename patches/{unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch => server/0068-Handle-Item-Meta-Inconsistencies.patch} (91%) rename patches/{unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch => server/0069-Configurable-Non-Player-Arrow-Despawn-Rate.patch} (89%) rename patches/{unapplied/server/0071-Add-World-Util-Methods.patch => server/0070-Add-World-Util-Methods.patch} (88%) rename patches/{unapplied/server/0072-Custom-replacement-for-eaten-items.patch => server/0071-Custom-replacement-for-eaten-items.patch} (90%) rename patches/{unapplied/server/0073-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch => server/0072-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch} (96%) rename patches/{unapplied/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch => server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch} (85%) rename patches/{unapplied/server/0075-Use-a-Shared-Random-for-Entities.patch => server/0074-Use-a-Shared-Random-for-Entities.patch} (93%) rename patches/{unapplied/server/0076-Configurable-spawn-chances-for-skeleton-horses.patch => server/0075-Configurable-spawn-chances-for-skeleton-horses.patch} (89%) rename patches/{unapplied/server/0077-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch => server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch} (98%) rename patches/{unapplied/server/0078-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch => server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch} (81%) rename patches/{unapplied/server/0079-Entity-AddTo-RemoveFrom-World-Events.patch => server/0078-Entity-AddTo-RemoveFrom-World-Events.patch} (83%) rename patches/{unapplied/server/0080-Configurable-Chunk-Inhabited-Time.patch => server/0079-Configurable-Chunk-Inhabited-Time.patch} (100%) rename patches/{unapplied/server/0081-EntityPathfindEvent.patch => server/0080-EntityPathfindEvent.patch} (100%) rename patches/{unapplied/server/0082-Sanitise-RegionFileCache-and-make-configurable.patch => server/0081-Sanitise-RegionFileCache-and-make-configurable.patch} (100%) rename patches/{unapplied/server/0083-Do-not-load-chunks-for-Pathfinding.patch => server/0082-Do-not-load-chunks-for-Pathfinding.patch} (87%) rename patches/{unapplied/server/0084-Add-PlayerUseUnknownEntityEvent.patch => server/0083-Add-PlayerUseUnknownEntityEvent.patch} (95%) rename patches/{unapplied/server/0085-Configurable-random-tick-rates-for-blocks.patch => server/0084-Configurable-random-tick-rates-for-blocks.patch} (86%) rename patches/{unapplied/server/0086-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch => server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch} (82%) rename patches/{unapplied/server/0087-Optimize-DataBits.patch => server/0086-Optimize-DataBits.patch} (100%) rename patches/{unapplied/server/0088-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch => server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch} (100%) rename patches/{unapplied/server/0089-Configurable-Player-Collision.patch => server/0088-Configurable-Player-Collision.patch} (86%) rename patches/{unapplied/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch => server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch} (100%) rename patches/{unapplied/server/0091-Configurable-RCON-IP-address.patch => server/0090-Configurable-RCON-IP-address.patch} (84%) rename patches/{unapplied/server/0092-EntityRegainHealthEvent-isFastRegen-API.patch => server/0091-EntityRegainHealthEvent-isFastRegen-API.patch} (93%) rename patches/{unapplied/server/0093-Add-ability-to-configure-frosted_ice-properties.patch => server/0092-Add-ability-to-configure-frosted_ice-properties.patch} (89%) rename patches/{unapplied/server/0094-remove-null-possibility-for-getServer-singleton.patch => server/0093-remove-null-possibility-for-getServer-singleton.patch} (87%) rename patches/{unapplied/server/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch => server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch} (95%) rename patches/{unapplied/server/0097-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch => server/0095-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch} (86%) delete mode 100644 patches/unapplied/server/0061-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch diff --git a/patches/unapplied/server/0051-Configurable-Disabling-Cat-Chest-Detection.patch b/patches/server/0051-Configurable-Disabling-Cat-Chest-Detection.patch similarity index 87% rename from patches/unapplied/server/0051-Configurable-Disabling-Cat-Chest-Detection.patch rename to patches/server/0051-Configurable-Disabling-Cat-Chest-Detection.patch index 5f0aea57be..acadfed227 100644 --- a/patches/unapplied/server/0051-Configurable-Disabling-Cat-Chest-Detection.patch +++ b/patches/server/0051-Configurable-Disabling-Cat-Chest-Detection.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Disabling Cat Chest Detection Offers a gameplay feature to stop cats from blocking chests diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java -index e89be04aed49723aca35c7b17b2a623eac0587e0..af6e245b02d5fb78764d2db0ac200056277b212a 100644 +index 3d153e5c48bc80ec969de9a32113537e03fb812b..9804ee2020e5cef23d3f5174d153fc149e611503 100644 --- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java -@@ -361,6 +361,11 @@ public class ChestBlock extends AbstractChestBlock implements +@@ -364,6 +364,11 @@ public class ChestBlock extends AbstractChestBlock implements } private static boolean isCatSittingOnChest(LevelAccessor world, BlockPos pos) { diff --git a/patches/unapplied/server/0052-Improve-Player-chat-API-handling.patch b/patches/server/0052-Improve-Player-chat-API-handling.patch similarity index 88% rename from patches/unapplied/server/0052-Improve-Player-chat-API-handling.patch rename to patches/server/0052-Improve-Player-chat-API-handling.patch index ccf8e7a730..467b022b11 100644 --- a/patches/unapplied/server/0052-Improve-Player-chat-API-handling.patch +++ b/patches/server/0052-Improve-Player-chat-API-handling.patch @@ -17,10 +17,10 @@ Co-authored-by: Jake Potrebic Co-authored-by: SoSeDiK diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 70fe4e973f41c2e5b12c0d96be418dd40e69c0f2..adef64b955170dc00c75c06bf0f41a09b2516520 100644 +index b41351783ea9795afaddce453c82ab32cb8134a1..870a1d6679fa062d90bcfa1a21a8af0cf67f2950 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1926,7 +1926,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1934,7 +1934,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } OutgoingChatMessage outgoing = OutgoingChatMessage.create(original); @@ -29,7 +29,7 @@ index 70fe4e973f41c2e5b12c0d96be418dd40e69c0f2..adef64b955170dc00c75c06bf0f41a09 this.handleCommand(s); } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Do nothing, this is coming from a plugin -@@ -2010,7 +2010,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2018,7 +2018,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } } @@ -40,10 +40,10 @@ index 70fe4e973f41c2e5b12c0d96be418dd40e69c0f2..adef64b955170dc00c75c06bf0f41a09 if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6f66f8514170e5686ed9410d1c755eeef5b61f8a..56fb2dfc920bde3554706fa218913af448a99fd9 100644 +index 7102165a09afdf6f33257f9fcd6c2c96aefd566a..21f7a4d8ad251468b78399df04587991e3df3a65 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -889,7 +889,7 @@ public final class CraftServer implements Server { +@@ -884,7 +884,7 @@ public final class CraftServer implements Server { public boolean dispatchCommand(CommandSender sender, String commandLine) { Preconditions.checkArgument(sender != null, "sender cannot be null"); Preconditions.checkArgument(commandLine != null, "commandLine cannot be null"); @@ -53,10 +53,10 @@ index 6f66f8514170e5686ed9410d1c755eeef5b61f8a..56fb2dfc920bde3554706fa218913af4 if (this.commandMap.dispatch(sender, commandLine)) { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d0448d310fde607a006acf37e86cd3eede93a2ba..4c4219ffe5c172d263106f522ea3ec7ba0d7dfad 100644 +index 1e395d14382c79231dc81d6cf7ea864e45906add..445e1349256a788a59831893ba7238ae95ae6bef 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -494,7 +494,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -501,7 +501,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (this.getHandle().connection == null) return; diff --git a/patches/unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch b/patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch similarity index 73% rename from patches/unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch rename to patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch index db7696dd7c..e870c64acc 100644 --- a/patches/unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -5,18 +5,18 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index 2e343d108714bd136ab8e7b20acbf241166177de..382cdfd7d7dceeeffed1cdc34b9e475a69b5c76b 100644 +index 8b2206c5c56341ecd96837bdb3e0c6ab7c874af5..ef382b08ff8e7f24500aed6752c76e6ffc3f0729 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java -@@ -331,7 +331,7 @@ public class Slime extends Mob implements Enemy { - } +@@ -338,7 +338,7 @@ public class Slime extends Mob implements Enemy { + } - ChunkPos chunkcoordintpair = new ChunkPos(pos); -- boolean flag = WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot + ChunkPos chunkcoordintpair = new ChunkPos(pos); +- boolean flag = WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot + boolean flag = world.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper - if (random.nextInt(10) == 0 && flag && pos.getY() < 40) { - return checkMobSpawnRules(type, world, spawnReason, pos, random); + if (random.nextInt(10) == 0 && flag && pos.getY() < 40) { + return checkMobSpawnRules(type, world, spawnReason, pos, random); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 7687a81bfa420e8377308fea3d6738141bc945d3..df02963faaf8f514f4175d394e67d2df10c8a3ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java diff --git a/patches/unapplied/server/0054-Expose-server-CommandMap.patch b/patches/server/0054-Expose-server-CommandMap.patch similarity index 78% rename from patches/unapplied/server/0054-Expose-server-CommandMap.patch rename to patches/server/0054-Expose-server-CommandMap.patch index bec5f46361..c86e610c28 100644 --- a/patches/unapplied/server/0054-Expose-server-CommandMap.patch +++ b/patches/server/0054-Expose-server-CommandMap.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 56fb2dfc920bde3554706fa218913af448a99fd9..b1779442254a582f2563e99bb50e47ba9d98b1d8 100644 +index 21f7a4d8ad251468b78399df04587991e3df3a65..0ef715796926076042705d48a20b80c4b4b29466 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2080,6 +2080,7 @@ public final class CraftServer implements Server { +@@ -2112,6 +2112,7 @@ public final class CraftServer implements Server { return this.helpMap; } diff --git a/patches/unapplied/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch b/patches/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch similarity index 89% rename from patches/unapplied/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch rename to patches/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch index 75c7eee8e3..2b2011aa32 100644 --- a/patches/unapplied/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch +++ b/patches/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 8d7124a9efce888ccfbef320a90c750f6009f551..aaf8ad36078554aa2783874f395da0997f6af92c 100644 +index 0ecfcf1b3a7a7ccdbb0d55f1b1e57feee4e724c3..bde3486b5eb89f8e35778eb59a44c7208ae38743 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -102,7 +102,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -103,7 +103,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @Override public void setHealth(double health) { health = (float) health; diff --git a/patches/unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch b/patches/server/0056-Player-Tab-List-and-Title-APIs.patch similarity index 91% rename from patches/unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch rename to patches/server/0056-Player-Tab-List-and-Title-APIs.patch index 71d8ee453b..ff80fd4603 100644 --- a/patches/unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch +++ b/patches/server/0056-Player-Tab-List-and-Title-APIs.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Player Tab List and Title APIs diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -index 7720470396d3ade926c4c75c5fab5a3f435b0033..9c211b0db837b16d50aee63d0caf45e1a12bcc83 100644 +index bc7d0cc8d66f07b45cffd9952829cc9bed9ce260..00beadec2ad995d724758d051457a3d780d9d813 100644 --- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java +++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java @@ -532,6 +532,11 @@ public class FriendlyByteBuf extends ByteBuf { - public FriendlyByteBuf writeComponent(final net.kyori.adventure.text.Component component) { - return this.writeUtf(io.papermc.paper.adventure.PaperAdventure.asJsonString(component, this.adventure$locale), 262144); + // TODO this.adventure$locale + return this.writeWithCodec(NbtOps.INSTANCE, ComponentSerialization.CODEC, io.papermc.paper.adventure.PaperAdventure.asVanilla(component)); } + + @Deprecated @@ -21,7 +21,7 @@ index 7720470396d3ade926c4c75c5fab5a3f435b0033..9c211b0db837b16d50aee63d0caf45e1 public FriendlyByteBuf writeComponent(Component text) { diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java -index c44a276d201fdfa5144d45d319d7761583c60639..f68a1a6dc6add9496e25cb52c318e086e356e2bb 100644 +index e77bd5bb66279f579fad4fdcc8b0606410922e9e..4c05fee93eb20044a4198c43d5ae1eebebaabaf7 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetSubtitleTextPacket.java @@ -7,6 +7,7 @@ import net.minecraft.network.protocol.Packet; @@ -42,7 +42,7 @@ index c44a276d201fdfa5144d45d319d7761583c60639..f68a1a6dc6add9496e25cb52c318e086 // Paper end buf.writeComponent(this.text); diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java -index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a43420b437 100644 +index 7bb08db97c324d13836303cc8a4623c71d6c8a2c..5e9045f7722481e1f83a3d36d7b3d86e9f45d5b1 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetTitleTextPacket.java @@ -7,6 +7,7 @@ import net.minecraft.network.protocol.Packet; @@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4 // Paper end buf.writeComponent(this.text); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4c4219ffe5c172d263106f522ea3ec7ba0d7dfad..ab8b584eb1c98d10caeb7d9581f826b4ae984c7c 100644 +index 445e1349256a788a59831893ba7238ae95ae6bef..136dd30ae472a58845a2d8f399d2040faed09345 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ @@ -73,7 +73,7 @@ index 4c4219ffe5c172d263106f522ea3ec7ba0d7dfad..ab8b584eb1c98d10caeb7d9581f826b4 import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -336,6 +337,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -343,6 +344,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/patches/unapplied/server/0057-Add-configurable-portal-search-radius.patch b/patches/server/0057-Add-configurable-portal-search-radius.patch similarity index 93% rename from patches/unapplied/server/0057-Add-configurable-portal-search-radius.patch rename to patches/server/0057-Add-configurable-portal-search-radius.patch index f81bc78f7b..94b5fff486 100644 --- a/patches/unapplied/server/0057-Add-configurable-portal-search-radius.patch +++ b/patches/server/0057-Add-configurable-portal-search-radius.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable portal search radius diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5d5cdcc3d6ba9b76b083404beb532eecf3f83f50..0d24d283ce035ab89136f4fc49a0ae08d90fd268 100644 +index 450a55fd1b01ac67d911d152a04a3dee3aa0a2e9..6fe0883a6746a31acff7ede501e058b68ad6e78d 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3200,7 +3200,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3233,7 +3233,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType()); BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0); // CraftBukkit start diff --git a/patches/unapplied/server/0058-Add-velocity-warnings.patch b/patches/server/0058-Add-velocity-warnings.patch similarity index 93% rename from patches/unapplied/server/0058-Add-velocity-warnings.patch rename to patches/server/0058-Add-velocity-warnings.patch index d3a71f3f2e..06978832ed 100644 --- a/patches/unapplied/server/0058-Add-velocity-warnings.patch +++ b/patches/server/0058-Add-velocity-warnings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b1779442254a582f2563e99bb50e47ba9d98b1d8..3771ac5c7663bbd2cc2c4c1acfe8fd8848713ce8 100644 +index 0ef715796926076042705d48a20b80c4b4b29466..8fbd8d021fe638505dc70188779f6b92ef2696cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -302,6 +302,7 @@ public final class CraftServer implements Server { +@@ -303,6 +303,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; @@ -17,10 +17,10 @@ index b1779442254a582f2563e99bb50e47ba9d98b1d8..3771ac5c7663bbd2cc2c4c1acfe8fd88 static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 402b6e5d6428c5a34d722888670f94c7fbe34fe4..68d00a158751d24c7f0e38920d78c0547f1928eb 100644 +index beae7b8cf726f61b25c5afb553da8c34dce1dd37..6100b2e718954b40f63ed30ab32e1dea4edba9a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -470,10 +470,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -477,10 +477,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public void setVelocity(Vector velocity) { Preconditions.checkArgument(velocity != null, "velocity"); velocity.checkFinite(); diff --git a/patches/unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch b/patches/server/0059-Configurable-inter-world-teleportation-safety.patch similarity index 91% rename from patches/unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch rename to patches/server/0059-Configurable-inter-world-teleportation-safety.patch index e54a85f1e9..caf6a2581b 100644 --- a/patches/unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch +++ b/patches/server/0059-Configurable-inter-world-teleportation-safety.patch @@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended This only is the case if the player is teleporting between worlds. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ab8b584eb1c98d10caeb7d9581f826b4ae984c7c..c87cba2252f091b026c9169ebf1117cd82d7942b 100644 +index 136dd30ae472a58845a2d8f399d2040faed09345..a58b0d10d73310587a05e40e072029ee258063e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1164,7 +1164,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1171,7 +1171,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entity.connection.teleport(to); } else { // The respawn reason should never be used if the passed location is non null. diff --git a/patches/unapplied/server/0060-Add-exception-reporting-event.patch b/patches/server/0060-Add-exception-reporting-event.patch similarity index 96% rename from patches/unapplied/server/0060-Add-exception-reporting-event.patch rename to patches/server/0060-Add-exception-reporting-event.patch index d44ecfec50..656dbd786d 100644 --- a/patches/unapplied/server/0060-Add-exception-reporting-event.patch +++ b/patches/server/0060-Add-exception-reporting-event.patch @@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8 + } +} diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java -index 0650b1eee2ae8caa5268f4df82f740440ce16fdf..0214830d9bc98b8d435ff11f40df65596980cf77 100644 +index 8d06e8d286da2573e40794adab695ff77e5afd86..78b11d6fd74fb0714a8013fdc78d096643c4f83c 100644 --- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java +++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java @@ -1,5 +1,6 @@ @@ -59,15 +59,15 @@ index 0650b1eee2ae8caa5268f4df82f740440ce16fdf..0214830d9bc98b8d435ff11f40df6559 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.io.Files; -@@ -358,6 +359,7 @@ public class OldUsersConverter { - root = NbtIo.readCompressed(new java.io.FileInputStream(file5)); +@@ -357,6 +358,7 @@ public class OldUsersConverter { + root = NbtIo.readCompressed(new java.io.FileInputStream(file5), NbtAccounter.unlimitedHeap()); } catch (Exception exception) { exception.printStackTrace(); + ServerInternalException.reportInternalException(exception); // Paper } if (root != null) { -@@ -371,6 +373,7 @@ public class OldUsersConverter { +@@ -370,6 +372,7 @@ public class OldUsersConverter { NbtIo.writeCompressed(root, new java.io.FileOutputStream(file2)); } catch (Exception exception) { exception.printStackTrace(); @@ -88,7 +88,7 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..fed09b886f4fa0006d160e5f2abb00df } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c2dd635cba209962d24b43fbf0ee0e9d9e82fee0..f7c69de5227a9b3fc409374d715aaecdf6330e70 100644 +index ac169632113c3d2177910723ce920cd9a4f7af66..5c42b38ab337a3fd4e4b4ac8d0aa2db43540446c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -1,5 +1,10 @@ @@ -102,7 +102,7 @@ index c2dd635cba209962d24b43fbf0ee0e9d9e82fee0..f7c69de5227a9b3fc409374d715aaecd import com.google.common.collect.Lists; import com.mojang.serialization.Codec; import java.io.IOException; -@@ -730,6 +735,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -741,6 +746,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper start - Prevent tile entity and entity crashes final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); MinecraftServer.LOGGER.error(msg, throwable); diff --git a/patches/unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0061-Disable-Scoreboards-for-non-players-by-default.patch similarity index 81% rename from patches/unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch rename to patches/server/0061-Disable-Scoreboards-for-non-players-by-default.patch index 8793195dfd..475344265b 100644 --- a/patches/unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch +++ b/patches/server/0061-Disable-Scoreboards-for-non-players-by-default.patch @@ -11,22 +11,22 @@ So avoid looking up scoreboards and short circuit to the "not on a team" logic which is most likely to be true. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0d24d283ce035ab89136f4fc49a0ae08d90fd268..25dbd41c5eb35b4d6cb1af159f665a1709e107d1 100644 +index 6fe0883a6746a31acff7ede501e058b68ad6e78d..08e3e87b2aa9d586cd1b441e7314d0775f7537c8 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2831,6 +2831,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2860,6 +2860,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @Nullable - public Team getTeam() { + public PlayerTeam getTeam() { + if (!this.level().paperConfig().scoreboards.allowNonPlayerEntitiesOnScoreboards && !(this instanceof Player)) { return null; } // Paper return this.level().getScoreboard().getPlayersTeam(this.getScoreboardName()); } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index f6cfed5ac40726475d1c121d0095c105f9426ae7..0bf4e33a67adf515b2675037b763632f1629ba34 100644 +index 4afd257f30ab063c4805e8a3144f51d643c49db3..a43539db71a7344e9477918dc5c7b07d46903bea 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -833,6 +833,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -832,6 +832,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (nbt.contains("Team", 8)) { String s = nbt.getString("Team"); PlayerTeam scoreboardteam = this.level().getScoreboard().getPlayerTeam(s); diff --git a/patches/unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch similarity index 87% rename from patches/unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch rename to patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch index eaa5849dc3..30e1c1215c 100644 --- a/patches/unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/patches/server/0062-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now deprecated diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index aaf8ad36078554aa2783874f395da0997f6af92c..2be4b3f8129e38f72c6c0013cc0de7060a78ae76 100644 +index bde3486b5eb89f8e35778eb59a44c7208ae38743..afbf6af7198bc69053882ac200892b5b695a4d36 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -267,9 +267,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -268,9 +268,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } @Override @@ -27,7 +27,7 @@ index aaf8ad36078554aa2783874f395da0997f6af92c..2be4b3f8129e38f72c6c0013cc0de706 } @Override -@@ -783,4 +789,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -788,4 +794,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.getHandle().persistentInvisibility = invisible; this.getHandle().setSharedFlag(5, invisible); } diff --git a/patches/unapplied/server/0064-Chunk-Save-Reattempt.patch b/patches/server/0063-Chunk-Save-Reattempt.patch similarity index 100% rename from patches/unapplied/server/0064-Chunk-Save-Reattempt.patch rename to patches/server/0063-Chunk-Save-Reattempt.patch diff --git a/patches/unapplied/server/0065-Complete-resource-pack-API.patch b/patches/server/0064-Complete-resource-pack-API.patch similarity index 87% rename from patches/unapplied/server/0065-Complete-resource-pack-API.patch rename to patches/server/0064-Complete-resource-pack-API.patch index 64bd615c79..12b02b3c12 100644 --- a/patches/unapplied/server/0065-Complete-resource-pack-API.patch +++ b/patches/server/0064-Complete-resource-pack-API.patch @@ -5,16 +5,16 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 0a0a9f1be333911b6de7502a9541063ab9ea0164..a258a252e749e3b7ebb1a6304b7f143e93a67178 100644 +index 0a6feccc657e62d7bad5e1461d5538a4c3a16b76..53833e155cf0d2328f2c2b36702970925045be3d 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -156,7 +156,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.playerProfile().getName()); + ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), packet.id()); this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect")); } -- this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), PlayerResourcePackStatusEvent.Status.values()[packet.getAction().ordinal()])); // CraftBukkit +- this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()])); // CraftBukkit + // Paper start -+ PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.getAction().ordinal()]; ++ PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()]; + player.getBukkitEntity().setResourcePackStatus(packStatus); + this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packStatus)); // CraftBukkit + // Paper end @@ -22,10 +22,10 @@ index 0a0a9f1be333911b6de7502a9541063ab9ea0164..a258a252e749e3b7ebb1a6304b7f143e } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c87cba2252f091b026c9169ebf1117cd82d7942b..e542d86dbf44e91058ad026e1bf9105d92fa687c 100644 +index a58b0d10d73310587a05e40e072029ee258063e1..06c0f72a83de5866f4c734c0809d60446a736af6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -191,6 +191,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -192,6 +192,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private double healthScale = 20; private CraftWorldBorder clientWorldBorder = null; private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener(); @@ -36,7 +36,7 @@ index c87cba2252f091b026c9169ebf1117cd82d7942b..e542d86dbf44e91058ad026e1bf9105d public CraftPlayer(CraftServer server, ServerPlayer entity) { super(server, entity); -@@ -2372,6 +2376,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2387,6 +2391,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } diff --git a/patches/unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch b/patches/server/0065-Default-loading-permissions.yml-before-plugins.patch similarity index 89% rename from patches/unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch rename to patches/server/0065-Default-loading-permissions.yml-before-plugins.patch index 6fc29b2301..f98bfaec16 100644 --- a/patches/unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch +++ b/patches/server/0065-Default-loading-permissions.yml-before-plugins.patch @@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3771ac5c7663bbd2cc2c4c1acfe8fd8848713ce8..231f59b2b2e90915787dfa80519ec55eed789d2d 100644 +index 8fbd8d021fe638505dc70188779f6b92ef2696cf..4b10f55ffe8a63de437ff821970f8924c13f6f24 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -465,6 +465,7 @@ public final class CraftServer implements Server { +@@ -460,6 +460,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { this.helpMap.clear(); this.helpMap.initializeGeneralTopics(); @@ -27,7 +27,7 @@ index 3771ac5c7663bbd2cc2c4c1acfe8fd8848713ce8..231f59b2b2e90915787dfa80519ec55e } Plugin[] plugins = this.pluginManager.getPlugins(); -@@ -484,7 +485,7 @@ public final class CraftServer implements Server { +@@ -479,7 +480,7 @@ public final class CraftServer implements Server { this.commandMap.registerServerAliases(); DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); diff --git a/patches/unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch b/patches/server/0066-Allow-Reloading-of-Custom-Permissions.patch similarity index 90% rename from patches/unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch rename to patches/server/0066-Allow-Reloading-of-Custom-Permissions.patch index 4fe19af119..cc1fdb0ed3 100644 --- a/patches/unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch +++ b/patches/server/0066-Allow-Reloading-of-Custom-Permissions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 231f59b2b2e90915787dfa80519ec55eed789d2d..111d86f1828b55844302b80b2855fb2ea88d67b6 100644 +index 4b10f55ffe8a63de437ff821970f8924c13f6f24..bf194d40a3078c0dda6da2d80d8dbd220f6af749 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2684,5 +2684,23 @@ public final class CraftServer implements Server { +@@ -2716,5 +2716,23 @@ public final class CraftServer implements Server { } return this.adventure$audiences; } diff --git a/patches/unapplied/server/0068-Remove-Metadata-on-reload.patch b/patches/server/0067-Remove-Metadata-on-reload.patch similarity index 88% rename from patches/unapplied/server/0068-Remove-Metadata-on-reload.patch rename to patches/server/0067-Remove-Metadata-on-reload.patch index 84422bbfd7..02bbdce1a3 100644 --- a/patches/unapplied/server/0068-Remove-Metadata-on-reload.patch +++ b/patches/server/0067-Remove-Metadata-on-reload.patch @@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 111d86f1828b55844302b80b2855fb2ea88d67b6..f6e6b929c3ce5091a44bba4ab354b8dae73e7cc8 100644 +index bf194d40a3078c0dda6da2d80d8dbd220f6af749..e85017f62eb90efda8d4f3910fe543c9a4a2243a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -956,8 +956,16 @@ public final class CraftServer implements Server { +@@ -951,8 +951,16 @@ public final class CraftServer implements Server { world.spigotConfig.init(); // Spigot } diff --git a/patches/unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch b/patches/server/0068-Handle-Item-Meta-Inconsistencies.patch similarity index 91% rename from patches/unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch rename to patches/server/0068-Handle-Item-Meta-Inconsistencies.patch index c0b9b7f046..ecb354002f 100644 --- a/patches/unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch +++ b/patches/server/0068-Handle-Item-Meta-Inconsistencies.patch @@ -18,10 +18,10 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 1b2c0fda262ca6d5bd2ce22bc2e934803bd6f602..cae548dbb5a3027e2de0bfbe38918ec7c2803e8e 100644 +index 9861cd23b07f8fbacb1d125af835dee58c2debbb..e6a47317eb24fc65ed02a4d4f9c4b19b5abc920d 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -157,6 +157,23 @@ public final class ItemStack { +@@ -180,6 +180,23 @@ public final class ItemStack { return this.getItem().getTooltipImage(this); } @@ -45,15 +45,15 @@ index 1b2c0fda262ca6d5bd2ce22bc2e934803bd6f602..cae548dbb5a3027e2de0bfbe38918ec7 public ItemStack(ItemLike item) { this(item, 1); } -@@ -205,6 +222,7 @@ public final class ItemStack { - // CraftBukkit start - make defensive copy as this data may be coming from the save thread +@@ -226,6 +243,7 @@ public final class ItemStack { + this.count = nbttagcompound.getByte("Count"); + if (nbttagcompound.contains("tag", 10)) { this.tag = nbttagcompound.getCompound("tag").copy(); - // CraftBukkit end + this.processEnchantOrder(this.tag); // Paper this.getItem().verifyTagAfterLoad(this.tag); } -@@ -819,6 +837,7 @@ public final class ItemStack { +@@ -844,6 +862,7 @@ public final class ItemStack { public void setTag(@Nullable CompoundTag nbt) { this.tag = nbt; @@ -61,7 +61,7 @@ index 1b2c0fda262ca6d5bd2ce22bc2e934803bd6f602..cae548dbb5a3027e2de0bfbe38918ec7 if (this.getItem().canBeDepleted()) { this.setDamageValue(this.getDamageValue()); } -@@ -1116,6 +1135,7 @@ public final class ItemStack { +@@ -1141,6 +1160,7 @@ public final class ItemStack { ListTag nbttaglist = this.tag.getList("Enchantments", 10); nbttaglist.add(EnchantmentHelper.storeEnchantment(EnchantmentHelper.getEnchantmentId(enchantment), (byte) level)); @@ -70,7 +70,7 @@ index 1b2c0fda262ca6d5bd2ce22bc2e934803bd6f602..cae548dbb5a3027e2de0bfbe38918ec7 public boolean isEnchanted() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 8eb170bd71c7158dcd1b90f9c8d46a13a2202509..f42f6f5fb7a2398c183eb9fa1a964a7680b687b8 100644 +index 7278ac809eff364e8b838d63a2ec1291493869f8..ee5989e52ce0b55d8bf867ab10801ba3252c88a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -188,28 +188,11 @@ public final class CraftItemStack extends ItemStack { @@ -111,7 +111,7 @@ index 8eb170bd71c7158dcd1b90f9c8d46a13a2202509..f42f6f5fb7a2398c183eb9fa1a964a76 if (this.handle == null) { return 0; } -- return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.getRaw(ench), this.handle); +- return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.bukkitToMinecraft(ench), this.handle); + // Paper start - replace to allow custom enchantments + final ListTag enchantments = this.handle.getEnchantmentTags(); + for (int i = 0; i < enchantments.size(); i++) { @@ -187,7 +187,7 @@ index 8eb170bd71c7158dcd1b90f9c8d46a13a2202509..f42f6f5fb7a2398c183eb9fa1a964a76 static Map getEnchantments(net.minecraft.world.item.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610aca5401e 100644 +index 0874c65c15fa66f61dfe8c440921b45e00b2f8b3..cd0c885ed63a3c43b915da239a8dddfee2622c76 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -214,7 +214,7 @@ index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610 import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nonnull; -@@ -276,7 +279,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -277,7 +280,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private List lore; // null and empty are two different states internally private Integer customModelData; private CompoundTag blockData; @@ -223,7 +223,7 @@ index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610 private Multimap attributeModifiers; private int repairCost; private int hideFlag; -@@ -287,7 +290,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -288,7 +291,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); private CompoundTag internalTag; @@ -232,7 +232,7 @@ index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610 private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftMetaItem.DATA_TYPE_REGISTRY); private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only -@@ -308,7 +311,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -309,7 +312,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.blockData = meta.blockData; if (meta.enchantments != null) { // Spigot @@ -241,7 +241,7 @@ index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610 } if (meta.hasAttributeModifiers()) { -@@ -391,13 +394,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -392,13 +395,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -257,7 +257,7 @@ index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610 for (int i = 0; i < ench.size(); i++) { String id = ((CompoundTag) ench.get(i)).getString(CraftMetaItem.ENCHANTMENTS_ID.NBT); -@@ -550,13 +553,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -551,13 +554,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -273,7 +273,7 @@ index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610 for (Map.Entry entry : ench.entrySet()) { // Doctor older enchants String enchantKey = entry.getKey().toString(); -@@ -832,14 +835,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -833,14 +836,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Map getEnchants() { @@ -290,7 +290,7 @@ index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1228,7 +1231,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1229,7 +1232,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -299,7 +299,7 @@ index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610 } if (this.hasAttributeModifiers()) { clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); -@@ -1470,4 +1473,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1471,4 +1474,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return CraftMetaItem.HANDLED_TAGS; } } diff --git a/patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/patches/server/0069-Configurable-Non-Player-Arrow-Despawn-Rate.patch similarity index 89% rename from patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to patches/server/0069-Configurable-Non-Player-Arrow-Despawn-Rate.patch index a7f6855957..b9e9704788 100644 --- a/patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/patches/server/0069-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate Can set a much shorter despawn rate for arrows that players can not pick up. diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index e147c56ad30a8e634052385ee9fee97c1ac48dcd..8d9e78efcd07e0fea627c2a5a128c7f15cf3413c 100644 +index 95d49d1f47a9c04535e94350bdcb4da88a1e5d27..b24f828d39fc26b4f85f5c76010f0ba47e9fe05f 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -312,7 +312,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -319,7 +319,7 @@ public abstract class AbstractArrow extends Projectile { protected void tickDespawn() { ++this.life; diff --git a/patches/unapplied/server/0071-Add-World-Util-Methods.patch b/patches/server/0070-Add-World-Util-Methods.patch similarity index 88% rename from patches/unapplied/server/0071-Add-World-Util-Methods.patch rename to patches/server/0070-Add-World-Util-Methods.patch index 17b4a8bfad..66af3764eb 100644 --- a/patches/unapplied/server/0071-Add-World-Util-Methods.patch +++ b/patches/server/0070-Add-World-Util-Methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 3ec4c76f8c41beb822acbb19b58e19ac2f3f2ef4..e24b6ee29c26b3cff85de592f60e7cac5c3a8f92 100644 +index fa6cec1933582fefeffd9382cbc24fea83b5eb13..a95fad7e0de2a6a1e3f37b40b82e3a51548dd3a4 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -221,7 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -223,7 +223,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; @@ -19,10 +19,10 @@ index 3ec4c76f8c41beb822acbb19b58e19ac2f3f2ef4..e24b6ee29c26b3cff85de592f60e7cac } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index f7c69de5227a9b3fc409374d715aaecdf6330e70..633dec47d91046f22f143421c9c9e20652a5b200 100644 +index 5c42b38ab337a3fd4e4b4ac8d0aa2db43540446c..ed38ad96b9344903097962a5bf94fb861651fcba 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -342,6 +342,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -345,6 +345,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return chunk == null ? null : chunk.getFluidState(blockposition); } diff --git a/patches/unapplied/server/0072-Custom-replacement-for-eaten-items.patch b/patches/server/0071-Custom-replacement-for-eaten-items.patch similarity index 90% rename from patches/unapplied/server/0072-Custom-replacement-for-eaten-items.patch rename to patches/server/0071-Custom-replacement-for-eaten-items.patch index 66d7937a3f..65d34ff7a1 100644 --- a/patches/unapplied/server/0072-Custom-replacement-for-eaten-items.patch +++ b/patches/server/0071-Custom-replacement-for-eaten-items.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 0bf4e33a67adf515b2675037b763632f1629ba34..85d36961dc90bb48e8462138e3ed503515fb313b 100644 +index a43539db71a7344e9477918dc5c7b07d46903bea..08ffa37aaf23c410c670ed1703c5eb2c10efa0f4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3696,10 +3696,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3698,10 +3698,11 @@ public abstract class LivingEntity extends Entity implements Attackable { this.triggerItemUseEffects(this.useItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; @@ -21,7 +21,7 @@ index 0bf4e33a67adf515b2675037b763632f1629ba34..85d36961dc90bb48e8462138e3ed5035 this.level().getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { -@@ -3713,6 +3714,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3715,6 +3716,12 @@ public abstract class LivingEntity extends Entity implements Attackable { } else { itemstack = this.useItem.finishUsingItem(this.level(), this); } @@ -34,7 +34,7 @@ index 0bf4e33a67adf515b2675037b763632f1629ba34..85d36961dc90bb48e8462138e3ed5035 // CraftBukkit end if (itemstack != this.useItem) { -@@ -3720,6 +3727,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3722,6 +3729,11 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.stopUsingItem(); diff --git a/patches/unapplied/server/0073-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/server/0072-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch similarity index 96% rename from patches/unapplied/server/0073-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch rename to patches/server/0072-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch index 056710b400..ac072360f0 100644 --- a/patches/unapplied/server/0073-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch +++ b/patches/server/0072-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch @@ -26,10 +26,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 85d36961dc90bb48e8462138e3ed503515fb313b..9b9e02f27f4281d3d39130521b1cc4e6979f8ea5 100644 +index 08ffa37aaf23c410c670ed1703c5eb2c10efa0f4..b76ac10fe0d4b860a4b30fae365cf38400afb456 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3464,7 +3464,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3466,7 +3466,7 @@ public abstract class LivingEntity extends Entity implements Attackable { Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ()); Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ()); @@ -63,10 +63,10 @@ index d6d8bbc98fc71997cb52521d59ebb59d727d3c22..3b31a1927aaed7fffc1b4f4bcefc1212 default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) { BlockState iblockdata = this.getBlockState(blockposition); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 633dec47d91046f22f143421c9c9e20652a5b200..374e37bc235aa17c7bf8fa4197f7ec244fda8664 100644 +index ed38ad96b9344903097962a5bf94fb861651fcba..272679dbd643487cf7b096828bb52b36031086a3 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -283,6 +283,90 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -286,6 +286,90 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return null; } diff --git a/patches/unapplied/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch similarity index 85% rename from patches/unapplied/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch rename to patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch index ba842e7a5b..5c88b1c648 100644 --- a/patches/unapplied/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,10 +5,10 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 9b9e02f27f4281d3d39130521b1cc4e6979f8ea5..2cf9d80494c6b70992d8ec74fe1697c6522bd952 100644 +index b76ac10fe0d4b860a4b30fae365cf38400afb456..1e2d3040bb3e8b1901fbc933caa5ad3b82d3468c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -794,7 +794,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -793,7 +793,13 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void readAdditionalSaveData(CompoundTag nbt) { @@ -23,7 +23,7 @@ index 9b9e02f27f4281d3d39130521b1cc4e6979f8ea5..2cf9d80494c6b70992d8ec74fe1697c6 if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { this.getAttributes().load(nbt.getList("Attributes", 10)); } -@@ -1344,6 +1350,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1343,6 +1349,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void setHealth(float health) { @@ -34,7 +34,7 @@ index 9b9e02f27f4281d3d39130521b1cc4e6979f8ea5..2cf9d80494c6b70992d8ec74fe1697c6 // CraftBukkit start - Handle scaled health if (this instanceof ServerPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity(); -@@ -3529,7 +3539,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3531,7 +3541,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public final void setAbsorptionAmount(float absorptionAmount) { @@ -44,10 +44,10 @@ index 9b9e02f27f4281d3d39130521b1cc4e6979f8ea5..2cf9d80494c6b70992d8ec74fe1697c6 protected void internalSetAbsorptionAmount(float absorptionAmount) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e542d86dbf44e91058ad026e1bf9105d92fa687c..7363c80d35d4ff61d771fb77125a4e520f745bba 100644 +index 06c0f72a83de5866f4c734c0809d60446a736af6..07960b6ff0cd42622315a27beb1496d41950f9f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2167,6 +2167,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2182,6 +2182,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/patches/unapplied/server/0075-Use-a-Shared-Random-for-Entities.patch b/patches/server/0074-Use-a-Shared-Random-for-Entities.patch similarity index 93% rename from patches/unapplied/server/0075-Use-a-Shared-Random-for-Entities.patch rename to patches/server/0074-Use-a-Shared-Random-for-Entities.patch index aaf1727b57..ff81d34d34 100644 --- a/patches/unapplied/server/0075-Use-a-Shared-Random-for-Entities.patch +++ b/patches/server/0074-Use-a-Shared-Random-for-Entities.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 25dbd41c5eb35b4d6cb1af159f665a1709e107d1..6b577914e6b7603f3cef4c4698d5f81b7ebff19c 100644 +index 08e3e87b2aa9d586cd1b441e7314d0775f7537c8..cc762d3eb68d2f8bf9529ecf07adfc343953c7a2 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -162,6 +162,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -163,6 +163,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } @@ -89,7 +89,7 @@ index 25dbd41c5eb35b4d6cb1af159f665a1709e107d1..6b577914e6b7603f3cef4c4698d5f81b private CraftEntity bukkitEntity; public CraftEntity getBukkitEntity() { -@@ -406,7 +479,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -411,7 +484,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; diff --git a/patches/unapplied/server/0076-Configurable-spawn-chances-for-skeleton-horses.patch b/patches/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch similarity index 89% rename from patches/unapplied/server/0076-Configurable-spawn-chances-for-skeleton-horses.patch rename to patches/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch index a11f40fbd1..438c8842fc 100644 --- a/patches/unapplied/server/0076-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/patches/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e24b6ee29c26b3cff85de592f60e7cac5c3a8f92..98468620840258701969abaf6d0df040d74f2298 100644 +index a95fad7e0de2a6a1e3f37b40b82e3a51548dd3a4..0fda3954f914889f9f3339f1ba231fb4818876af 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -830,7 +830,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -847,7 +847,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (this.isRainingAt(blockposition)) { DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); diff --git a/patches/unapplied/server/0077-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch b/patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch similarity index 98% rename from patches/unapplied/server/0077-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch rename to patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch index b5d65629ac..807dd80521 100644 --- a/patches/unapplied/server/0077-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch +++ b/patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch @@ -29,10 +29,10 @@ index 1b29c6872ebe54351f28c1f1f38b22561ba785ee..40950db0c242c65dfd4de247c8624935 this.x = x; this.y = y; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 374e37bc235aa17c7bf8fa4197f7ec244fda8664..a9d04b3fd53532b4b380123fceab1ab5e4b206c2 100644 +index 272679dbd643487cf7b096828bb52b36031086a3..a589b70303bf66c41e6ea1dbf493d14304df25ab 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -368,7 +368,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -371,7 +371,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper end public boolean isInWorldBounds(BlockPos pos) { diff --git a/patches/unapplied/server/0078-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch similarity index 81% rename from patches/unapplied/server/0078-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch rename to patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index beb60551c8..4289248804 100644 --- a/patches/unapplied/server/0078-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener Saves on some object allocation and processing when no plugin listens to this diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4627eb980d5ac1571f57756bc90f2ae6d361f522..26015e5bf2c0f5c176c5e9d7c9eb98419617c509 100644 +index 6986109ca6de3c73d63c4539477997361044e64f..3b13d7b760ac2df6e21c0ac7064fae8240866399 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1351,6 +1351,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return worldserver + " " + worldserver.dimension().location(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 98468620840258701969abaf6d0df040d74f2298..ab55fd417a8914eac912ef4c40527df80f72e2e4 100644 +index 0fda3954f914889f9f3339f1ba231fb4818876af..0718f8745fed4cd0cbb29372159ff39bdce7d0fd 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -220,6 +220,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; @@ -30,10 +30,10 @@ index 98468620840258701969abaf6d0df040d74f2298..ab55fd417a8914eac912ef4c40527df8 @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkSource.getChunk(x, z, false); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index a9d04b3fd53532b4b380123fceab1ab5e4b206c2..d9a03a3d262fee9f93b1ccf3a08ec0b77efa1c33 100644 +index a589b70303bf66c41e6ea1dbf493d14304df25ab..9bb380e7c8973b4728b5d4aad663af9e477dda0c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -580,7 +580,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -583,7 +583,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit start iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam CraftWorld world = ((ServerLevel) this).getWorld(); @@ -43,10 +43,10 @@ index a9d04b3fd53532b4b380123fceab1ab5e4b206c2..d9a03a3d262fee9f93b1ccf3a08ec0b7 this.getCraftServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/world/level/block/BushBlock.java b/src/main/java/net/minecraft/world/level/block/BushBlock.java -index d40e791529911ca81398ac267a819415da91502a..03fde6e47c4a347c62fe9b4a3351769aedf874f6 100644 +index 1d46dd41b51a449ed8e032e36e65aad8043fba56..bed3d9c781c7d3ca260027b4737970889a54689c 100644 --- a/src/main/java/net/minecraft/world/level/block/BushBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BushBlock.java -@@ -24,7 +24,7 @@ public class BushBlock extends Block { +@@ -28,7 +28,7 @@ public abstract class BushBlock extends Block { public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) { // CraftBukkit start if (!state.canSurvive(world, pos)) { @@ -56,12 +56,12 @@ index d40e791529911ca81398ac267a819415da91502a..03fde6e47c4a347c62fe9b4a3351769a } } diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java -index ec66f00703fcb68aa567b2d14a756729371320e0..9db66b393e057d93a8025b803ae0ad2a1bca61f6 100644 +index db67c85810cd42e1c9dee96e8b51d194393c1eb7..0f0750f8c790d0db72a0e6b277449a1461674890 100644 --- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java +++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java -@@ -95,7 +95,7 @@ public class DoublePlantBlock extends BushBlock { +@@ -102,7 +102,7 @@ public class DoublePlantBlock extends BushBlock { - protected static void preventCreativeDropFromBottomPart(Level world, BlockPos pos, BlockState state, Player player) { + protected static void preventDropFromBottomPart(Level world, BlockPos pos, BlockState state, Player player) { // CraftBukkit start - if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) { + if (((net.minecraft.server.level.ServerLevel)world).hasPhysicsEvent && org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) { // Paper diff --git a/patches/unapplied/server/0079-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 83% rename from patches/unapplied/server/0079-Entity-AddTo-RemoveFrom-World-Events.patch rename to patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch index f79bfa48e1..234431c160 100644 --- a/patches/unapplied/server/0079-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ab55fd417a8914eac912ef4c40527df80f72e2e4..3078aa3b6b4ba5afbe5f216a90f58834e6f72957 100644 +index 0718f8745fed4cd0cbb29372159ff39bdce7d0fd..3d826b82034dc12daa521414142dfe3cdd41365b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2366,6 +2366,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2402,6 +2402,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.setOrigin(entity.getOriginVector().toLocation(getWorld())); } // Paper end @@ -16,7 +16,7 @@ index ab55fd417a8914eac912ef4c40527df80f72e2e4..3078aa3b6b4ba5afbe5f216a90f58834 } public void onTrackingEnd(Entity entity) { -@@ -2441,6 +2442,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2477,6 +2478,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } // CraftBukkit end diff --git a/patches/unapplied/server/0080-Configurable-Chunk-Inhabited-Time.patch b/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch similarity index 100% rename from patches/unapplied/server/0080-Configurable-Chunk-Inhabited-Time.patch rename to patches/server/0079-Configurable-Chunk-Inhabited-Time.patch diff --git a/patches/unapplied/server/0081-EntityPathfindEvent.patch b/patches/server/0080-EntityPathfindEvent.patch similarity index 100% rename from patches/unapplied/server/0081-EntityPathfindEvent.patch rename to patches/server/0080-EntityPathfindEvent.patch diff --git a/patches/unapplied/server/0082-Sanitise-RegionFileCache-and-make-configurable.patch b/patches/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch similarity index 100% rename from patches/unapplied/server/0082-Sanitise-RegionFileCache-and-make-configurable.patch rename to patches/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch diff --git a/patches/unapplied/server/0083-Do-not-load-chunks-for-Pathfinding.patch b/patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch similarity index 87% rename from patches/unapplied/server/0083-Do-not-load-chunks-for-Pathfinding.patch rename to patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch index 5adba4580e..5d5acfa445 100644 --- a/patches/unapplied/server/0083-Do-not-load-chunks-for-Pathfinding.patch +++ b/patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Do not load chunks for Pathfinding diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -index b7995e6159c865f8e2e7865f7eb51936a9720311..10503d6d8b6daf645cf4360ee289d5e25144c976 100644 +index cd6778fa1d4261caf846ae71702621d2ec6b98c1..8e90b284fb576738b834626bb52c9962ccbc5ad2 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -@@ -459,7 +459,12 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -465,7 +465,12 @@ public class WalkNodeEvaluator extends NodeEvaluator { for(int n = -1; n <= 1; ++n) { if (l != 0 || n != 0) { pos.set(i + l, j + m, k + n); @@ -22,7 +22,7 @@ index b7995e6159c865f8e2e7865f7eb51936a9720311..10503d6d8b6daf645cf4360ee289d5e2 if (blockState.is(Blocks.CACTUS) || blockState.is(Blocks.SWEET_BERRY_BUSH)) { return BlockPathTypes.DANGER_OTHER; } -@@ -475,6 +480,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -481,6 +486,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { if (blockState.is(Blocks.WITHER_ROSE) || blockState.is(Blocks.POINTED_DRIPSTONE)) { return BlockPathTypes.DAMAGE_CAUTIOUS; } @@ -30,7 +30,7 @@ index b7995e6159c865f8e2e7865f7eb51936a9720311..10503d6d8b6daf645cf4360ee289d5e2 } } } -@@ -484,7 +490,8 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -490,7 +496,8 @@ public class WalkNodeEvaluator extends NodeEvaluator { } protected static BlockPathTypes getBlockPathTypeRaw(BlockGetter world, BlockPos pos) { diff --git a/patches/unapplied/server/0084-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch similarity index 95% rename from patches/unapplied/server/0084-Add-PlayerUseUnknownEntityEvent.patch rename to patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch index 6c68a42dc2..7c691f4261 100644 --- a/patches/unapplied/server/0084-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch @@ -28,10 +28,10 @@ index 644a0fdea6576647539b96528717dbaeab498d93..221e64a66ff12a8de5c75992fc26a54a + // Paper end - PlayerUseUnknownEntityEvent } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index adef64b955170dc00c75c06bf0f41a09b2516520..3fbe132d278928a55115dce116f14ac1ce1ebc69 100644 +index 870a1d6679fa062d90bcfa1a21a8af0cf67f2950..d03d5629e3605626bba6ea806990443bfb151c61 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2393,8 +2393,38 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2401,8 +2401,38 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl }); } } diff --git a/patches/unapplied/server/0085-Configurable-random-tick-rates-for-blocks.patch b/patches/server/0084-Configurable-random-tick-rates-for-blocks.patch similarity index 86% rename from patches/unapplied/server/0085-Configurable-random-tick-rates-for-blocks.patch rename to patches/server/0084-Configurable-random-tick-rates-for-blocks.patch index d492f4f705..5255c876b5 100644 --- a/patches/unapplied/server/0085-Configurable-random-tick-rates-for-blocks.patch +++ b/patches/server/0084-Configurable-random-tick-rates-for-blocks.patch @@ -9,10 +9,10 @@ of a variety of blocks that are random ticked. Co-authored-by: MrPowerGamerBR diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java -index 3b4d8a47e7fe08284b79fab2d147629e902db026..eb6056c5051e5e8a872a10dc993dbd5232787663 100644 +index 3ce4bb344dbb8b50ef4041801e034e79f0b0d19d..6c1e8ba518c883aa5c079b4c94f068833609acc3 100644 --- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java -@@ -85,6 +85,8 @@ public class FarmBlock extends Block { +@@ -92,6 +92,8 @@ public class FarmBlock extends Block { @Override public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { int i = (Integer) state.getValue(FarmBlock.MOISTURE); @@ -22,18 +22,18 @@ index 3b4d8a47e7fe08284b79fab2d147629e902db026..eb6056c5051e5e8a872a10dc993dbd52 if (!FarmBlock.isNearWater(world, pos) && !world.isRainingAt(pos.above())) { if (i > 0) { diff --git a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java -index 1df22561b2d39066b6b30f10ea43edd734e3b50a..1fe07f8f9b28faf076209f7ad235fd5dc948b294 100644 +index 65db2229dae0547c7a3e2847bba7b1a1795ce30f..f38524cbcaa908644d901bf0929331d6dfd99ed9 100644 --- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java -@@ -2,6 +2,7 @@ package net.minecraft.world.level.block; - +@@ -3,6 +3,7 @@ package net.minecraft.world.level.block; + import com.mojang.serialization.MapCodec; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.tags.FluidTags; import net.minecraft.util.RandomSource; -@@ -39,6 +40,7 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock { +@@ -43,6 +44,7 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock { @Override public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { diff --git a/patches/unapplied/server/0086-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch similarity index 82% rename from patches/unapplied/server/0086-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch rename to patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index 104a73791e..26e7d65b48 100644 --- a/patches/unapplied/server/0086-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 3078aa3b6b4ba5afbe5f216a90f58834e6f72957..b9fcfaf683d9c0e90a287506afd759d8877f4b24 100644 +index 3d826b82034dc12daa521414142dfe3cdd41365b..af16cabd57a5fb28c2e70856730dd0df6c8abf9c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1600,6 +1600,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1619,6 +1619,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void updateNeighborsAt(BlockPos pos, Block sourceBlock) { diff --git a/patches/unapplied/server/0087-Optimize-DataBits.patch b/patches/server/0086-Optimize-DataBits.patch similarity index 100% rename from patches/unapplied/server/0087-Optimize-DataBits.patch rename to patches/server/0086-Optimize-DataBits.patch diff --git a/patches/unapplied/server/0088-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/patches/server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch similarity index 100% rename from patches/unapplied/server/0088-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch rename to patches/server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch diff --git a/patches/unapplied/server/0089-Configurable-Player-Collision.patch b/patches/server/0088-Configurable-Player-Collision.patch similarity index 86% rename from patches/unapplied/server/0089-Configurable-Player-Collision.patch rename to patches/server/0088-Configurable-Player-Collision.patch index 7cbe1e28aa..090748be48 100644 --- a/patches/unapplied/server/0089-Configurable-Player-Collision.patch +++ b/patches/server/0088-Configurable-Player-Collision.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable Player Collision diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java -index 1294b38262505b0d54089e428df9b363219de1f0..ee37ec0de1ca969144824427ae42b0c81434a1b4 100644 +index 3d2a689d11bfa230bab61a2a65c6051328f6b78d..e52644010dc2cf41bbf508b16b8ec2f0003e9d0b 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java @@ -193,7 +193,7 @@ public class ClientboundSetPlayerTeamPacket implements Packet playersByName = new java.util.HashMap<>(); @@ -62,12 +62,12 @@ index 703f006bee56bc198f0711ad464570fca406284c..2ceb330e087fd397887d2f4383fcc759 public PlayerList(MinecraftServer server, LayeredRegistryAccess registryManager, PlayerDataStorage saveHandler, int maxPlayers) { this.cserver = server.server = new CraftServer((DedicatedServer) server, this); -@@ -399,6 +401,13 @@ public abstract class PlayerList { +@@ -398,6 +400,13 @@ public abstract class PlayerList { player.initInventoryMenu(); // CraftBukkit - Moved from above, added world + // Paper start - Add to collideRule team if needed -+ final Scoreboard scoreboard = this.getServer().getLevel(Level.OVERWORLD).getScoreboard(); ++ final net.minecraft.world.scores.Scoreboard scoreboard = this.getServer().getLevel(Level.OVERWORLD).getScoreboard(); + final PlayerTeam collideRuleTeam = scoreboard.getPlayerTeam(this.collideRuleTeamName); + if (this.collideRuleTeamName != null && collideRuleTeam != null && player.getTeam() == null) { + scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); @@ -76,13 +76,13 @@ index 703f006bee56bc198f0711ad464570fca406284c..2ceb330e087fd397887d2f4383fcc759 PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); } -@@ -522,6 +531,16 @@ public abstract class PlayerList { +@@ -521,6 +530,16 @@ public abstract class PlayerList { entityplayer.doTick(); // SPIGOT-924 // CraftBukkit end + // Paper start - Remove from collideRule team if needed + if (this.collideRuleTeamName != null) { -+ final Scoreboard scoreBoard = this.server.getLevel(Level.OVERWORLD).getScoreboard(); ++ final net.minecraft.world.scores.Scoreboard scoreBoard = this.server.getLevel(Level.OVERWORLD).getScoreboard(); + final PlayerTeam team = scoreBoard.getPlayersTeam(this.collideRuleTeamName); + if (entityplayer.getTeam() == team && team != null) { + scoreBoard.removePlayerFromTeam(entityplayer.getScoreboardName(), team); @@ -93,7 +93,7 @@ index 703f006bee56bc198f0711ad464570fca406284c..2ceb330e087fd397887d2f4383fcc759 this.save(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -1160,6 +1179,13 @@ public abstract class PlayerList { +@@ -1161,6 +1180,13 @@ public abstract class PlayerList { } // CraftBukkit end diff --git a/patches/unapplied/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/patches/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 100% rename from patches/unapplied/server/0090-Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to patches/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch diff --git a/patches/unapplied/server/0091-Configurable-RCON-IP-address.patch b/patches/server/0090-Configurable-RCON-IP-address.patch similarity index 84% rename from patches/unapplied/server/0091-Configurable-RCON-IP-address.patch rename to patches/server/0090-Configurable-RCON-IP-address.patch index 4036fa039e..bb99ea9ebe 100644 --- a/patches/unapplied/server/0091-Configurable-RCON-IP-address.patch +++ b/patches/server/0090-Configurable-RCON-IP-address.patch @@ -9,10 +9,10 @@ For servers with multiple IP's, ability to bind to a specific interface. public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String; diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -index 20d02405b8e6476b11a8c8518c9a3949d3df11a4..bdf520c32847658fefaf2bde33bac16ea807002f 100644 +index d64ac84d4c5ef3dd3054a601deee128d3069686b..7edce6f8d1f313a9e1e100704d625e317f779fa0 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -109,6 +109,8 @@ public class DedicatedServerProperties extends Settings 11 - state.getValue(AGE) - state.getLightBlock(world, pos) && this.slightlyMelt(state, world, pos)) { BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(); -@@ -39,12 +40,12 @@ public class FrostedIceBlock extends IceBlock { +@@ -47,12 +48,12 @@ public class FrostedIceBlock extends IceBlock { mutableBlockPos.setWithOffset(pos, direction); BlockState blockState = world.getBlockState(mutableBlockPos); if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) { diff --git a/patches/unapplied/server/0094-remove-null-possibility-for-getServer-singleton.patch b/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch similarity index 87% rename from patches/unapplied/server/0094-remove-null-possibility-for-getServer-singleton.patch rename to patches/server/0093-remove-null-possibility-for-getServer-singleton.patch index edeb8cca8b..0cd120d3c1 100644 --- a/patches/unapplied/server/0094-remove-null-possibility-for-getServer-singleton.patch +++ b/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch @@ -6,10 +6,10 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a6758b10f106eba19e508be8fbdb4f7903c1f185..937de8ff1f8c25861ae09af197d75577088b70fe 100644 +index 450a9336a8a39a4ace147c73f82f9281fb5cc787..ee751fb9580064682e650cf1c959a0e159a89bf2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -189,6 +189,7 @@ import co.aikar.timings.MinecraftTimings; // Paper +@@ -190,6 +190,7 @@ import co.aikar.timings.MinecraftTimings; // Paper public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements ServerInfo, CommandSource, AutoCloseable { @@ -17,7 +17,7 @@ index a6758b10f106eba19e508be8fbdb4f7903c1f185..937de8ff1f8c25861ae09af197d75577 public static final Logger LOGGER = LogUtils.getLogger(); public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper public static final String VANILLA_BRAND = "vanilla"; -@@ -314,6 +315,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -@@ -2319,9 +2321,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop -Date: Tue, 8 Mar 2016 18:28:43 -0800 -Subject: [PATCH] Don't nest if we don't need to when cerealising text - components - - -diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java -index 55e21c7b13826f60e3c656f76e1507e0242e0af3..1387e3597c43fd652f2fc82ca6fc2e83039604e2 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java -@@ -14,7 +14,7 @@ public record ClientboundSystemChatPacket(@javax.annotation.Nullable net.kyori.a - } - - public ClientboundSystemChatPacket(net.md_5.bungee.api.chat.BaseComponent[] content, boolean overlay) { -- this(null, net.md_5.bungee.chat.ComponentSerializer.toString(content), overlay); // Paper - Adventure -+ this(null, improveBungeeComponentSerialization(content), overlay); // Paper - Adventure - } - // Spigot end - // Paper start -@@ -25,6 +25,14 @@ public record ClientboundSystemChatPacket(@javax.annotation.Nullable net.kyori.a - public ClientboundSystemChatPacket(net.kyori.adventure.text.Component content, boolean overlay) { - this(content, null, overlay); - } -+ -+ private static String improveBungeeComponentSerialization(net.md_5.bungee.api.chat.BaseComponent[] content) { -+ if (content.length == 1) { -+ return net.md_5.bungee.chat.ComponentSerializer.toString(content[0]); -+ } else { -+ return net.md_5.bungee.chat.ComponentSerializer.toString(content); -+ } -+ } - // Paper end - - public ClientboundSystemChatPacket(FriendlyByteBuf buf) {