From 016966e97ecc7e2c3b82c14bbc1d746d28ecbf1d Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sun, 18 Jun 2023 19:13:08 -0500 Subject: [PATCH] Update Paper --- gradle.properties | 2 +- patches/server/0001-Build-changes.patch | 8 ++++---- ...06-Removes-useless-spammy-error-logging.patch | 4 ++-- ...dinates-before-attempting-to-get-block-.patch | 4 ++-- ...ter-handling-of-invalid-JSON-components.patch | 4 ++-- .../0029-Add-spectator-teleport-event.patch | 4 ++-- .../0030-Prevent-invalid-container-events.patch | 6 +++--- ...Add-Scissors-configuration-file-command.patch | 16 ++++++++-------- ...-Patch-invalid-entity-rotation-log-spam.patch | 6 +++--- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/gradle.properties b/gradle.properties index 0391582..abc3a4d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=me.totalfreedom.scissors version=1.20.1-R0.1-SNAPSHOT mcVersion=1.20.1 -paperRef=072b78a713cc2c90d63cd10840b2b21803b7148e +paperRef=3756f5bbf566fde4aa619bf8d4215f68567621d3 org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/server/0001-Build-changes.patch b/patches/server/0001-Build-changes.patch index 99777d6..6943f2b 100644 --- a/patches/server/0001-Build-changes.patch +++ b/patches/server/0001-Build-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Build changes diff --git a/build.gradle.kts b/build.gradle.kts -index 19186e436cd6a5f00f0b42ac11f8050ad2ef6713..33234e6d52e12a33b9f55f18a2c3c5de5c408158 100644 +index 6d3d573ffc118e7f4d76422dc014a7df0384bb49..42b129bd0da13136a98a52c224cc71c27c6af173 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,8 +7,10 @@ plugins { @@ -91,10 +91,10 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..2fbb5fc19e6d7f3767c7c6eedcbc6af2 .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 80cf4852e4010eeeadaf920ab927a40df0179b40..a276c294e161bc0e5c13c7cd607592ac9062dcfa 100644 +index 912affb0ab1c4c40f7a655194e95ec6f0ebf1fcd..bd128d228b9ae01e021d54befc6155102d5ffb84 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1679,7 +1679,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b38c4cbcf0405d82c7b6e018e80a3174e460c1a4..bcd9565c8e09b44ca4cac372bea1b1e9ec343871 100644 +index 513c34aa02d63f7e3c178eade818e156af4541db..c19ea0dd30c39b1e7a30ab5bcc32820a5ee3d16a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2473,12 +2473,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2486,12 +2486,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.setRot(this.getYRot(), this.getXRot()); if (nbt.contains("CustomName", 8)) { String s = nbt.getString("CustomName"); diff --git a/patches/server/0029-Add-spectator-teleport-event.patch b/patches/server/0029-Add-spectator-teleport-event.patch index 530a54c..6e1bf32 100644 --- a/patches/server/0029-Add-spectator-teleport-event.patch +++ b/patches/server/0029-Add-spectator-teleport-event.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add spectator teleport event diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fa97bbaa8b48a81c06d0dc375ad89b7d76e52d83..6abdf9ac215fbe8015459258a6783d31e0a3933f 100644 +index fa5fee810dc8aa7febb46bbf0ad9ab9ce9ffbabd..77bf4cebd9cb92d6dfd03b6734b50d4457243bc9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1,5 +1,6 @@ @@ -15,7 +15,7 @@ index fa97bbaa8b48a81c06d0dc375ad89b7d76e52d83..6abdf9ac215fbe8015459258a6783d31 import com.google.common.collect.Lists; import com.google.common.primitives.Floats; import com.mojang.brigadier.ParseResults; -@@ -2069,6 +2070,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2070,6 +2071,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic Entity entity = packet.getEntity(worldserver); if (entity != null) { diff --git a/patches/server/0030-Prevent-invalid-container-events.patch b/patches/server/0030-Prevent-invalid-container-events.patch index 9b1144b..095919f 100644 --- a/patches/server/0030-Prevent-invalid-container-events.patch +++ b/patches/server/0030-Prevent-invalid-container-events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent invalid container events diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6abdf9ac215fbe8015459258a6783d31e0a3933f..afc17ec86d12cefc30c2aabd86a04131f7dffdb6 100644 +index 77bf4cebd9cb92d6dfd03b6734b50d4457243bc9..f6f5efbf757f1508b628db90c9f63da382ebf4d5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -30,6 +30,8 @@ import java.util.function.UnaryOperator; @@ -17,7 +17,7 @@ index 6abdf9ac215fbe8015459258a6783d31e0a3933f..afc17ec86d12cefc30c2aabd86a04131 import net.minecraft.ChatFormatting; import net.minecraft.CrashReport; import net.minecraft.CrashReportCategory; -@@ -2988,6 +2990,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2989,6 +2991,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleContainerClick(ServerboundContainerClickPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (this.player.isImmobile()) return; // CraftBukkit @@ -25,7 +25,7 @@ index 6abdf9ac215fbe8015459258a6783d31e0a3933f..afc17ec86d12cefc30c2aabd86a04131 this.player.resetLastActionTime(); if (this.player.containerMenu.containerId == packet.getContainerId() && this.player.containerMenu.stillValid(this.player)) { // CraftBukkit boolean cancelled = this.player.isSpectator(); // CraftBukkit - see below if -@@ -3009,6 +3012,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3010,6 +3013,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } diff --git a/patches/server/0035-Add-Scissors-configuration-file-command.patch b/patches/server/0035-Add-Scissors-configuration-file-command.patch index 6d8a3a1..c84f1e8 100644 --- a/patches/server/0035-Add-Scissors-configuration-file-command.patch +++ b/patches/server/0035-Add-Scissors-configuration-file-command.patch @@ -486,7 +486,7 @@ index 9f422cbeaa52b3e6a0a27af4f8ad4ddb7808483f..bbfb536ddec7f44d2a75d35ab495be26 this.setFlightAllowed(dedicatedserverproperties.allowFlight); this.setMotd(dedicatedserverproperties.motd); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 27c48014605d34d9716ea3029ac84b2eb4907a4e..26bf05922698c734302fa80076e7a1eadbfe1d8d 100644 +index 7e473ebbc8d89b01e1ee09047d43d075906d0d7c..2ec716cdfec40106d72552b24b741c4219a6e196 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1,5 +1,6 @@ @@ -496,7 +496,7 @@ index 27c48014605d34d9716ea3029ac84b2eb4907a4e..26bf05922698c734302fa80076e7a1ea import me.totalfreedom.scissors.event.player.SpectatorTeleportEvent; import com.google.common.collect.Lists; import com.google.common.primitives.Floats; -@@ -2378,6 +2379,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2379,6 +2380,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic Optional optional = this.lastSeenMessages.applyUpdate(acknowledgment); if (optional.isEmpty()) { @@ -509,7 +509,7 @@ index 27c48014605d34d9716ea3029ac84b2eb4907a4e..26bf05922698c734302fa80076e7a1ea 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 } -@@ -2610,11 +2617,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2611,11 +2618,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatAck(ServerboundChatAckPacket packet) { LastSeenMessagesValidator lastseenmessagesvalidator = this.lastSeenMessages; @@ -670,10 +670,10 @@ index 0521240dddde12d78cc05deda7fac11690f5d155..f19d82fd11633d9f91a70fb14cb5a1bc } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9767d6bba065d1d37dc387ef01bad4aabfe503bb..244f307f5f71a9bc937bb1f42cca35d876dbf49b 100644 +index 454dcf7006cfbc86d19dde3fe3a6aa0591b2001d..5293040c7ec5824e40b0779ce507fc4994eb80b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -982,6 +982,7 @@ public final class CraftServer implements Server { +@@ -1052,6 +1052,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot @@ -681,7 +681,7 @@ index 9767d6bba065d1d37dc387ef01bad4aabfe503bb..244f307f5f71a9bc937bb1f42cca35d8 this.console.paperConfigurations.reloadConfigs(this.console); for (ServerLevel world : this.console.getAllLevels()) { // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty -@@ -1013,6 +1014,7 @@ public final class CraftServer implements Server { +@@ -1083,6 +1084,7 @@ public final class CraftServer implements Server { this.reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper @@ -689,7 +689,7 @@ index 9767d6bba065d1d37dc387ef01bad4aabfe503bb..244f307f5f71a9bc937bb1f42cca35d8 this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2780,6 +2782,12 @@ public final class CraftServer implements Server { +@@ -2850,6 +2852,12 @@ public final class CraftServer implements Server { return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console); } @@ -703,7 +703,7 @@ index 9767d6bba065d1d37dc387ef01bad4aabfe503bb..244f307f5f71a9bc937bb1f42cca35d8 public void restart() { org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 0fb3a648ee6bd6cb88515770bcfc70e368313527..5bbfcfe68dace755fe6ec4bc94965d216d998382 100644 +index 2a834708001ea940d8ab6f6559024df32b1e9520..70268a0bec5172bf723e3f9a8fe3208276f3bfa8 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -180,9 +180,27 @@ public class Main { diff --git a/patches/server/0036-Patch-invalid-entity-rotation-log-spam.patch b/patches/server/0036-Patch-invalid-entity-rotation-log-spam.patch index 919692d..783e16f 100644 --- a/patches/server/0036-Patch-invalid-entity-rotation-log-spam.patch +++ b/patches/server/0036-Patch-invalid-entity-rotation-log-spam.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Patch invalid entity rotation log spam diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index bcd9565c8e09b44ca4cac372bea1b1e9ec343871..71e64ecf217b77371b5be32f93c66be042f124f2 100644 +index c19ea0dd30c39b1e7a30ab5bcc32820a5ee3d16a..4705a80cd759dce1fe5313417c7eb0e7be05e706 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4615,7 +4615,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4628,7 +4628,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public void setYRot(float yaw) { if (!Float.isFinite(yaw)) { @@ -19,7 +19,7 @@ index bcd9565c8e09b44ca4cac372bea1b1e9ec343871..71e64ecf217b77371b5be32f93c66be0 } else { this.yRot = yaw; } -@@ -4627,7 +4629,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4640,7 +4642,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public void setXRot(float pitch) { if (!Float.isFinite(pitch)) {