From f12f43848108174559031cc18dae0de0a2e52cbf Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 12 Nov 2023 19:30:17 -0600 Subject: [PATCH] Update Paper --- gradle.properties | 2 +- patches/api/0004-Add-Scissors-configuration-file.patch | 4 ++-- patches/server/0002-Build-changes.patch | 8 ++++---- .../0016-Add-Scissors-configuration-file-command.patch | 10 +++++----- patches/server/0028-Add-spectator-teleport-event.patch | 4 ++-- .../server/0029-Prevent-invalid-container-events.patch | 4 ++-- ...idate-block-entity-entity-tag-query-positions.patch | 6 +++--- ...nfiguration-option-to-disable-chat-signatures.patch | 10 +++++----- .../server/0044-Implement-command-block-events.patch | 6 +++--- .../server/0049-Fix-packet-related-lag-exploits.patch | 10 +++++----- 10 files changed, 32 insertions(+), 32 deletions(-) diff --git a/gradle.properties b/gradle.properties index a9a1d9a..fc9635a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=me.totalfreedom.scissors version=1.20.2-R0.1-SNAPSHOT mcVersion=1.20.2 -paperRef=274e54ba58383e352ee631ed2934858e77c887ea +paperRef=f186318a91cbd3b2a2259d39cb88576989a496b8 org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/api/0004-Add-Scissors-configuration-file.patch b/patches/api/0004-Add-Scissors-configuration-file.patch index 6bce36e..8f6474a 100644 --- a/patches/api/0004-Add-Scissors-configuration-file.patch +++ b/patches/api/0004-Add-Scissors-configuration-file.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Scissors configuration file diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 8d8fe04e6b09d2a5b1cc05002073df5c58cdcb96..9fd0d55bac867322e8c72dcf4a17bd18f7aa423c 100644 +index d0c634629aa0b6bac0da93655dd86ad3aea0ce30..5729362a327f6cc67e86d4ebf5328fc60ed710f7 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2121,6 +2121,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2190,6 +2190,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi } // Paper end diff --git a/patches/server/0002-Build-changes.patch b/patches/server/0002-Build-changes.patch index 3911916..54f7e1e 100644 --- a/patches/server/0002-Build-changes.patch +++ b/patches/server/0002-Build-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Build changes diff --git a/build.gradle.kts b/build.gradle.kts -index a79461457ea19339f47572c70705d655ebc55276..321c6408bdaf7fb99d40e1130b2b687b97a2ad43 100644 +index 79beac737c17412913983614bd478d33e3c6ed58..27d5dd68175641152cb78e6aba69890c00ef9b51 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,8 +13,13 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { @@ -96,7 +96,7 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..21ded7c14c56a40feaa7741131be5166 .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7a9373df55bdbd01eb30ac9c623561087bd6b43e..9f8b2fe4fd9377d48623e80f65dde03479f4fad0 100644 +index 3d5d79e428a7b0f1aa7d0d3911e6d61b9537e8a0..97231b3a80c248efca4a7ef644272801644386d5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1712,7 +1712,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop optional = this.lastSeenMessages.applyUpdate(acknowledgment); if (optional.isEmpty()) { @@ -87,7 +87,7 @@ index 250d2383d7df9584e52a9600b0ac89f96ba7002d..cecd2bafc30650d4b7720571bcd127c9 ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString()); this.disconnect(ServerGamePacketListenerImpl.CHAT_VALIDATION_FAILED, org.bukkit.event.player.PlayerKickEvent.Cause.CHAT_VALIDATION_FAILED); // Paper - kick event causes } -@@ -2483,6 +2485,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2484,6 +2486,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl synchronized (this.lastSeenMessages) { if (!this.lastSeenMessages.applyOffset(packet.offset())) { @@ -95,7 +95,7 @@ index 250d2383d7df9584e52a9600b0ac89f96ba7002d..cecd2bafc30650d4b7720571bcd127c9 ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString()); this.disconnect(ServerGamePacketListenerImpl.CHAT_VALIDATION_FAILED, org.bukkit.event.player.PlayerKickEvent.Cause.CHAT_VALIDATION_FAILED); // Paper - kick event causes } -@@ -3461,6 +3464,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3462,6 +3465,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleChatSessionUpdate(ServerboundChatSessionUpdatePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); diff --git a/patches/server/0044-Implement-command-block-events.patch b/patches/server/0044-Implement-command-block-events.patch index 4c96b62..dc34029 100644 --- a/patches/server/0044-Implement-command-block-events.patch +++ b/patches/server/0044-Implement-command-block-events.patch @@ -18,7 +18,7 @@ index c99fc118013cb3d4043638e2001a8297e79ddf9c..cdaa81e1f2167b29ec01cc25e51a8400 private final boolean trackOutput; diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 19f573a1f62280bd9b67a4027962fcb7de6d2514..f5cdac55c8cbe334b96c5a0b2c34f216109120d3 100644 +index 94cc122aad0e48687ea9f25cd810f07dc893acc6..bcb195b1e40f562d0cd5ecca236ebba87150d236 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1,6 +1,8 @@ @@ -47,7 +47,7 @@ index 19f573a1f62280bd9b67a4027962fcb7de6d2514..f5cdac55c8cbe334b96c5a0b2c34f216 import org.slf4j.Logger; // CraftBukkit start -@@ -892,6 +897,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -893,6 +898,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.player.level().getChunkAt(blockposition).setBlockEntity(tileentity); } @@ -64,7 +64,7 @@ index 19f573a1f62280bd9b67a4027962fcb7de6d2514..f5cdac55c8cbe334b96c5a0b2c34f216 commandblocklistenerabstract.setCommand(s); commandblocklistenerabstract.setTrackOutput(flag); if (!flag) { -@@ -923,7 +938,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -924,7 +939,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl BaseCommandBlock commandblocklistenerabstract = packet.getCommandBlock(this.player.level()); if (commandblocklistenerabstract != null) { diff --git a/patches/server/0049-Fix-packet-related-lag-exploits.patch b/patches/server/0049-Fix-packet-related-lag-exploits.patch index 80be59d..b3b06b6 100644 --- a/patches/server/0049-Fix-packet-related-lag-exploits.patch +++ b/patches/server/0049-Fix-packet-related-lag-exploits.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix packet-related lag exploits diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f5cdac55c8cbe334b96c5a0b2c34f216109120d3..78f9e0587f35ed8034fd2c275e0e06abae90e0e6 100644 +index bcb195b1e40f562d0cd5ecca236ebba87150d236..fee0a88c6ccecd71ebf63651655dec2d5097f894 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -857,7 +857,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -858,7 +858,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); } else if (!this.player.canUseGameMasterBlocks() && (!this.player.isCreative() || !this.player.getBukkitEntity().hasPermission("minecraft.commandblock"))) { // Paper - command block permission this.player.sendSystemMessage(Component.translatable("advMode.notAllowed")); @@ -17,7 +17,7 @@ index f5cdac55c8cbe334b96c5a0b2c34f216109120d3..78f9e0587f35ed8034fd2c275e0e06ab BaseCommandBlock commandblocklistenerabstract = null; CommandBlockEntity tileentitycommand = null; BlockPos blockposition = packet.getPos(); -@@ -1024,7 +1024,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1025,7 +1025,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleSetStructureBlock(ServerboundSetStructureBlockPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); @@ -26,7 +26,7 @@ index f5cdac55c8cbe334b96c5a0b2c34f216109120d3..78f9e0587f35ed8034fd2c275e0e06ab BlockPos blockposition = packet.getPos(); BlockState iblockdata = this.player.level().getBlockState(blockposition); BlockEntity tileentity = this.player.level().getBlockEntity(blockposition); -@@ -1082,7 +1082,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1083,7 +1083,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleSetJigsawBlock(ServerboundSetJigsawBlockPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); @@ -35,7 +35,7 @@ index f5cdac55c8cbe334b96c5a0b2c34f216109120d3..78f9e0587f35ed8034fd2c275e0e06ab BlockPos blockposition = packet.getPos(); BlockState iblockdata = this.player.level().getBlockState(blockposition); BlockEntity tileentity = this.player.level().getBlockEntity(blockposition); -@@ -1105,7 +1105,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1106,7 +1106,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleJigsawGenerate(ServerboundJigsawGeneratePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());