Update Paper

This commit is contained in:
Telesphoreo 2023-04-04 19:06:20 -05:00
parent 345a876a96
commit 8f9ead55be
7 changed files with 16 additions and 16 deletions

View File

@ -2,7 +2,7 @@ plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.0" apply false
id("io.papermc.paperweight.patcher") version "1.5.3"
id("io.papermc.paperweight.patcher") version "1.5.4"
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"

View File

@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
version=1.19.4-R0.1-SNAPSHOT
mcVersion=1.19.4
paperRef=9893e2b73438034246f79e57e7efb29757e9661e
paperRef=497b91939cf2972bac5337487f9f71770044fbc8
org.gradle.caching=true
org.gradle.parallel=true

View File

@ -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 d587b2c4e39bce7e098aa9fab361230f72770658..7d0f736f8ca9a50961b9d7ebfb86d373c6d6f060 100644
index 177aac1ab10189bb5a52217e86ba5c8a535b4197..8bd5be47e30c7a25762e758566bbceb046e66270 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1912,6 +1912,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1920,6 +1920,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Spigot end
@ -28,7 +28,7 @@ index d587b2c4e39bce7e098aa9fab361230f72770658..7d0f736f8ca9a50961b9d7ebfb86d373
@Override
public void handleUseItemOn(ServerboundUseItemOnPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
@@ -3329,17 +3341,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3337,17 +3349,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);

View File

@ -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 68fe0d4142a468ea4cbbb79573b02ab8cd0ae823..b4e49a37b0d815a9a3e321ec5c8f7196a5e3a80d 100644
index 8bd5be47e30c7a25762e758566bbceb046e66270..cf5ba11ecceb3fd42c5848fc854f79058d1c45b5 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 68fe0d4142a468ea4cbbb79573b02ab8cd0ae823..b4e49a37b0d815a9a3e321ec5c8f7196
import com.google.common.collect.Lists;
import com.google.common.primitives.Floats;
import com.mojang.brigadier.ParseResults;
@@ -2058,6 +2059,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2066,6 +2067,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Entity entity = packet.getEntity(worldserver);
if (entity != null) {

View File

@ -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 18df58a75c76078f289a3884650edef382f196b5..4eec243172d52e8956a9c2c1bff3e3145acce736 100644
index cf5ba11ecceb3fd42c5848fc854f79058d1c45b5..ef3c1cfcf56d7dd5767db293b069dc138d5e0d3a 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 18df58a75c76078f289a3884650edef382f196b5..4eec243172d52e8956a9c2c1bff3e314
import net.minecraft.ChatFormatting;
import net.minecraft.CrashReport;
import net.minecraft.CrashReportCategory;
@@ -2971,6 +2973,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2979,6 +2981,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 18df58a75c76078f289a3884650edef382f196b5..4eec243172d52e8956a9c2c1bff3e314
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
@@ -2992,6 +2995,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3000,6 +3003,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
return;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Validate block entity tag query positions
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 98ad7153e2d8a202938815beae9883f8dc78b471..c15c5855dca11cd69f316c42783d32b800a93bd7 100644
index ef3c1cfcf56d7dd5767db293b069dc138d5e0d3a..10a4806e2b65b99b3a3a9091829bb029ce7cee2b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1362,7 +1362,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1370,7 +1370,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleBlockEntityTagQuery(ServerboundBlockEntityTagQuery packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());

View File

@ -486,7 +486,7 @@ index a7e133f3495e9132a5fdae2c24f225e7b026295a..16f0daad2456ce23f8d73389f62aac9f
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 c21e15ec8f87defe4c724dfe2659779b876fba27..598b1754c51a62975aaa98aba45aca149e8812bf 100644
index 10a4806e2b65b99b3a3a9091829bb029ce7cee2b..c5902b6bc9cbd8d95688047f0cb84b4e2cfa4e43 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 c21e15ec8f87defe4c724dfe2659779b876fba27..598b1754c51a62975aaa98aba45aca14
import me.totalfreedom.scissors.event.player.SpectatorTeleportEvent;
import com.google.common.collect.Lists;
import com.google.common.primitives.Floats;
@@ -2361,6 +2362,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2369,6 +2370,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Optional<LastSeenMessages> optional = this.lastSeenMessages.applyUpdate(acknowledgment);
if (optional.isEmpty()) {
@ -509,7 +509,7 @@ index c21e15ec8f87defe4c724dfe2659779b876fba27..598b1754c51a62975aaa98aba45aca14
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
}
@@ -2593,11 +2600,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2601,11 +2608,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleChatAck(ServerboundChatAckPacket packet) {
LastSeenMessagesValidator lastseenmessagesvalidator = this.lastSeenMessages;
@ -663,7 +663,7 @@ index 4da4edae517a0efec6e03a719ec47b700509dab1..837b20be528bc33f62c0c675d90afebd
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ccc578bf2d7edfe866a5892978ce9e116787c4b4..4cb94d9e1f4ec56e01289b25c952c00df25f71a1 100644
index c714eb04b9ca520e83a704a4c5464cafe9bd9447..47406504e3b5f4ef8a3c5549b40e2ae808d121fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -955,6 +955,7 @@ public final class CraftServer implements Server {