diff --git a/patches/unapplied/api/0164-Make-the-default-permission-message-configurable.patch b/patches/api/0164-Make-the-default-permission-message-configurable.patch similarity index 100% rename from patches/unapplied/api/0164-Make-the-default-permission-message-configurable.patch rename to patches/api/0164-Make-the-default-permission-message-configurable.patch diff --git a/patches/unapplied/server/0288-Optimize-World-Time-Updates.patch b/patches/server/0286-Optimize-World-Time-Updates.patch similarity index 94% rename from patches/unapplied/server/0288-Optimize-World-Time-Updates.patch rename to patches/server/0286-Optimize-World-Time-Updates.patch index b0e88e4f78..8d22fd2b2e 100644 --- a/patches/unapplied/server/0288-Optimize-World-Time-Updates.patch +++ b/patches/server/0286-Optimize-World-Time-Updates.patch @@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7cc7918628937dcc14538fe4784bfd6fa068e393..e7fefa95597d4c7388052731a79b8c7c55d2a766 100644 +index 19e7488055447d3bc402150c6686f96dfd592ac2..76923773118ac2f152ba7b3a0bb5d0e71d95533c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1408,12 +1408,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 36.0D) { @@ -42,7 +42,7 @@ index 315dad4789f5f2582ee9b4fc176affd1f57537ef..6219634a57976a6a0a9b32ed08d56107 this.player.connection.send(new ClientboundBlockBreakAckPacket(pos, this.level.getBlockState(pos), action, false, "too far")); } else if (pos.getY() >= worldHeight) { this.player.connection.send(new ClientboundBlockBreakAckPacket(pos, this.level.getBlockState(pos), action, false, "too high")); -@@ -295,10 +302,12 @@ public class ServerPlayerGameMode { +@@ -294,10 +301,12 @@ public class ServerPlayerGameMode { this.player.connection.send(new ClientboundBlockBreakAckPacket(pos, this.level.getBlockState(pos), action, true, "stopped destroying")); } else if (action == ServerboundPlayerActionPacket.Action.ABORT_DESTROY_BLOCK) { this.isDestroyingBlock = false; @@ -59,10 +59,10 @@ index 315dad4789f5f2582ee9b4fc176affd1f57537ef..6219634a57976a6a0a9b32ed08d56107 this.level.destroyBlockProgress(this.player.getId(), pos, -1); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 38a48add445e8dd6888bc5bb22e7bf5482682536..a615821cf605208c61be27f8bd026437b799de14 100644 +index 26ca0db447a76c3028dacf96bf9afd3b735bda74..25ec1613f4c9ecc59ec5e27717ff7de9ad9e4398 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1544,7 +1544,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1550,7 +1550,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser case START_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK: case STOP_DESTROY_BLOCK: diff --git a/patches/unapplied/server/0294-Make-the-default-permission-message-configurable.patch b/patches/server/0291-Make-the-default-permission-message-configurable.patch similarity index 95% rename from patches/unapplied/server/0294-Make-the-default-permission-message-configurable.patch rename to patches/server/0291-Make-the-default-permission-message-configurable.patch index 2517cfdd2d..8c3f515feb 100644 --- a/patches/unapplied/server/0294-Make-the-default-permission-message-configurable.patch +++ b/patches/server/0291-Make-the-default-permission-message-configurable.patch @@ -42,10 +42,10 @@ index 1015fcc6c77bd64c3f3cbf234e85a6602dbfa0d7..769353df1fcdaacecd80085165a1d72f Object val = config.get("settings.save-player-data"); if (val instanceof Boolean) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 921128242ba133d73d2ac592a5f4b7515ef2e46c..67eb0b97d6ca74e815140eea7f5262b55f6f8e6e 100644 +index 41de977650b5b6ebb8120d31f5106342189e4a59..7f20134859f39fc819cc0010b88828f210617c71 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2519,6 +2519,11 @@ public final class CraftServer implements Server { +@@ -2531,6 +2531,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/patches/unapplied/server/0295-Prevent-rayTrace-from-loading-chunks.patch b/patches/server/0292-Prevent-rayTrace-from-loading-chunks.patch similarity index 89% rename from patches/unapplied/server/0295-Prevent-rayTrace-from-loading-chunks.patch rename to patches/server/0292-Prevent-rayTrace-from-loading-chunks.patch index 7043bbb004..d20b7dd2df 100644 --- a/patches/unapplied/server/0295-Prevent-rayTrace-from-loading-chunks.patch +++ b/patches/server/0292-Prevent-rayTrace-from-loading-chunks.patch @@ -7,13 +7,13 @@ ray tracing into an unloaded chunk should be treated as a miss this saves a ton of lag for when AI tries to raytrace near unloaded chunks. diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java -index e85e4a2dfceb0aa40e73b43a5e122a5906cac585..fe4dba491b586757a16aa36e62682f364daa2602 100644 +index 03e0254813b977d0342171a37762fec9629afbad..80fb161de60021e4ddf240376069a4de8f9a7191 100644 --- a/src/main/java/net/minecraft/world/level/BlockGetter.java +++ b/src/main/java/net/minecraft/world/level/BlockGetter.java @@ -75,7 +75,15 @@ public interface BlockGetter extends LevelHeightAccessor { // CraftBukkit start - moved block handling into separate method for use by Block#rayTrace - default BlockHitResult rayTraceBlock(ClipContext raytrace1, BlockPos blockposition) { + default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) { - BlockState iblockdata = this.getBlockState(blockposition); + // Paper start - Prevent raytrace from loading chunks + BlockState iblockdata = this.getTypeIfLoaded(blockposition); diff --git a/patches/unapplied/server/0296-Handle-Large-Packets-disconnecting-client.patch b/patches/server/0293-Handle-Large-Packets-disconnecting-client.patch similarity index 86% rename from patches/unapplied/server/0296-Handle-Large-Packets-disconnecting-client.patch rename to patches/server/0293-Handle-Large-Packets-disconnecting-client.patch index 8f495a8a20..dab7c75b93 100644 --- a/patches/unapplied/server/0296-Handle-Large-Packets-disconnecting-client.patch +++ b/patches/server/0293-Handle-Large-Packets-disconnecting-client.patch @@ -7,7 +7,7 @@ If a players inventory is too big to send in a single packet, split the inventory set into multiple packets instead. diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 636ac646bec67dbd933f00614693af03481b6173..3b943894750022aa84de8af97db3eebf71db1afa 100644 +index 0aacf2e0155a9a7c9dfe9b368a251aee25ed24fc..0b3f1585618e29685ffcba704f03ff5e581f0851 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -120,6 +120,15 @@ public class Connection extends SimpleChannelInboundHandler> { @@ -27,11 +27,11 @@ index 636ac646bec67dbd933f00614693af03481b6173..3b943894750022aa84de8af97db3eebf Connection.LOGGER.debug("Skipping packet due to errors", throwable.getCause()); } else { diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java -index 092d8ecf8d6a7045d2fc379bc0f9ec4ee294d056..b039a32b805fc02033fa862a1c40c4a51639e69a 100644 +index dfeff0da932b0d66b70f3a5dd281c926c048f2f0..9cdcd4d92f73d1b9866cdef33d2463e843462516 100644 --- a/src/main/java/net/minecraft/network/PacketEncoder.java +++ b/src/main/java/net/minecraft/network/PacketEncoder.java -@@ -54,7 +54,31 @@ public class PacketEncoder extends MessageToByteEncoder> { - throw var9; +@@ -57,7 +57,31 @@ public class PacketEncoder extends MessageToByteEncoder> { + throw var10; } } + @@ -100,13 +100,13 @@ index 0e076173033278587df2b5dfbd01cc9005651eb5..dbd8b9b09b82c1b75e8be9dc7416d9f0 @Override public void write(FriendlyByteBuf buf) { buf.writeByte(this.containerId); -diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java -index 1451a98d69b185dd15a2d1d7681bcecb6a4f99c1..96626835fee3c0fdb452acacdc9f737ad90c08de 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java -@@ -64,7 +64,7 @@ public class ClientboundLevelChunkPacket implements Packet 2097152) { + if (i > 2097152) { // Paper - diff on change - if this changes, update PacketEncoder diff --git a/todo.txt b/todo.txt index d14a417b40..c8b02579e5 100644 --- a/todo.txt +++ b/todo.txt @@ -3,3 +3,4 @@ Check IBlockDataList#GLOBAL_PALETTE Check if PlayerNaturallySpawnedEvent is called correctly Make sure fluids aren't completly fucked, there may be more sync loads to nuke there as well Improve Server Thread Pool and Thread Priorities: mojang added a max thread count property +Use Vanilla Minecart Speeds: is this needed?