From b3693eebb83fb1c3237261b0cc051ec5a16bc4e4 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sat, 8 Oct 2022 16:32:38 -0500 Subject: [PATCH] Update Paper --- gradle.properties | 2 +- ...lidate-coordinates-before-attempting-to-get-block-.patch | 6 +++--- .../0028-Better-handling-of-invalid-JSON-components.patch | 4 ++-- patches/server/0032-Add-spectator-teleport-event.patch | 4 ++-- patches/server/0033-Prevent-invalid-container-events.patch | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gradle.properties b/gradle.properties index 09b0c03..6757e79 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=me.totalfreedom.scissors version=1.19.2-R0.1-SNAPSHOT mcVersion=1.19.2 -paperRef=928bcc8d3a058221146cea1de7d42d7e178e78f2 +paperRef=77a50b95dada2d73b92fdd95d674d357b64bc7d4 org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/server/0023-Validate-coordinates-before-attempting-to-get-block-.patch b/patches/server/0023-Validate-coordinates-before-attempting-to-get-block-.patch index ac42908..a618fd4 100644 --- a/patches/server/0023-Validate-coordinates-before-attempting-to-get-block-.patch +++ b/patches/server/0023-Validate-coordinates-before-attempting-to-get-block-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Validate coordinates before attempting to get block entities diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9eb921fec32afa360f3a402e978411fcf3ec618c..fde54ce82ed015cfb6d0767b70ff073bc02a0ba5 100644 +index 63c9040ed2349eec500ba6e9090440347c514a3b..9b34348cc01da257cccf9ff387fb8151eb1e6729 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1933,6 +1933,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1934,6 +1934,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Spigot end @@ -28,7 +28,7 @@ index 9eb921fec32afa360f3a402e978411fcf3ec618c..fde54ce82ed015cfb6d0767b70ff073b @Override public void handleUseItemOn(ServerboundUseItemOnPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); -@@ -3448,17 +3460,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3449,17 +3461,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!itemstack.isEmpty() && nbttagcompound != null && nbttagcompound.contains("x") && nbttagcompound.contains("y") && nbttagcompound.contains("z") && this.player.getBukkitEntity().hasPermission("minecraft.nbt.copy")) { // Spigot BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); diff --git a/patches/server/0028-Better-handling-of-invalid-JSON-components.patch b/patches/server/0028-Better-handling-of-invalid-JSON-components.patch index 67a1308..abb5874 100644 --- a/patches/server/0028-Better-handling-of-invalid-JSON-components.patch +++ b/patches/server/0028-Better-handling-of-invalid-JSON-components.patch @@ -110,10 +110,10 @@ index 97a2657bc98d41c3c1e376b266d2c85f685acc88..7b6476455e095eed15c92797ce3a3e11 } }).reduce((accumulator, current) -> { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 008bd65d838819431a0823c6ac5925774bd155a1..5f6d431e3c6f734e25462e62a799e63aae7f5ed5 100644 +index 756b8e68c6b7c21c1ef78b68da9e41db4828c7c9..3b9cedc8ca6fb245570d59f42bdf87248e6a2e2c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2316,12 +2316,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2317,12 +2317,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/0032-Add-spectator-teleport-event.patch b/patches/server/0032-Add-spectator-teleport-event.patch index 2d601be..3fa1557 100644 --- a/patches/server/0032-Add-spectator-teleport-event.patch +++ b/patches/server/0032-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 fde54ce82ed015cfb6d0767b70ff073bc02a0ba5..8ad540867e1f7942170f24faa4f42a84c0c63690 100644 +index 9b34348cc01da257cccf9ff387fb8151eb1e6729..64680b3e8d5b6cc6da86f5beb9e44dd9ba82aa96 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 fde54ce82ed015cfb6d0767b70ff073bc02a0ba5..8ad540867e1f7942170f24faa4f42a84 import com.google.common.collect.Lists; import com.google.common.primitives.Floats; import com.mojang.brigadier.ParseResults; -@@ -2076,6 +2077,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2077,6 +2078,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic Entity entity = packet.getEntity(worldserver); if (entity != null) { diff --git a/patches/server/0033-Prevent-invalid-container-events.patch b/patches/server/0033-Prevent-invalid-container-events.patch index 6bcc5d1..392f47b 100644 --- a/patches/server/0033-Prevent-invalid-container-events.patch +++ b/patches/server/0033-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 8ad540867e1f7942170f24faa4f42a84c0c63690..a7eb51e6b695cdb9dc20698b774da33ec4035544 100644 +index 64680b3e8d5b6cc6da86f5beb9e44dd9ba82aa96..acecdd69e53e75760ac86b8406d74b803ebeef94 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -29,6 +29,8 @@ import java.util.function.UnaryOperator; @@ -17,7 +17,7 @@ index 8ad540867e1f7942170f24faa4f42a84c0c63690..a7eb51e6b695cdb9dc20698b774da33e import net.minecraft.ChatFormatting; import net.minecraft.CrashReport; import net.minecraft.CrashReportCategory; -@@ -3095,6 +3097,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3096,6 +3098,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleContainerClick(ServerboundContainerClickPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (this.player.isImmobile()) return; // CraftBukkit @@ -25,7 +25,7 @@ index 8ad540867e1f7942170f24faa4f42a84c0c63690..a7eb51e6b695cdb9dc20698b774da33e 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 -@@ -3116,6 +3119,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3117,6 +3120,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; }