Update Paper

This commit is contained in:
Telesphoreo 2022-07-29 20:48:11 -05:00
parent 442a0e1e2d
commit 1530ddabf9
6 changed files with 17 additions and 17 deletions

View File

@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
version=1.19.1-R0.1-SNAPSHOT
mcVersion=1.19.1
paperRef=4a4ee79cd6a70811e9d62c58abc5f3b6a8627f5c
paperRef=65f0b2e2e490448da8c4a8af88e620a02a0797a1
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 a14710afaabf2b3b43f18ebe52eec8befff2b4ed..20434cf62c7876ebd254b181d7de550fbebb9bc6 100644
index ff7df8026f85b7ad51458a0b720a8baf71cd9bd1..5e105ed98ce3a1ec4b3acc98f57a526404fa1052 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1909,6 +1909,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1931,6 +1931,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Spigot end
@ -28,7 +28,7 @@ index a14710afaabf2b3b43f18ebe52eec8befff2b4ed..20434cf62c7876ebd254b181d7de550f
@Override
public void handleUseItemOn(ServerboundUseItemOnPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
@@ -3396,17 +3408,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3418,17 +3430,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,10 +5,10 @@ Subject: [PATCH] Better handling of invalid JSON components
diff --git a/src/main/java/net/minecraft/network/chat/Component.java b/src/main/java/net/minecraft/network/chat/Component.java
index bbfb98618a0b87406cc48465bdda15a0a4974b7e..a38127366c55a2d377727d9a9aec32b0e3ad437a 100644
index e7d9e2d8c87ddf3658b1c2e0f2a3e98ef8080cec..16192d2af2bd2c3f0bd4376e5fd7d6e46dac897c 100644
--- a/src/main/java/net/minecraft/network/chat/Component.java
+++ b/src/main/java/net/minecraft/network/chat/Component.java
@@ -25,6 +25,7 @@ import java.util.List;
@@ -26,6 +26,7 @@ import java.util.List;
import java.util.Map.Entry;
import java.util.Optional;
import javax.annotation.Nullable;
@ -16,7 +16,7 @@ index bbfb98618a0b87406cc48465bdda15a0a4974b7e..a38127366c55a2d377727d9a9aec32b0
import net.minecraft.Util;
import net.minecraft.network.chat.contents.BlockDataSource;
import net.minecraft.network.chat.contents.DataSource;
@@ -490,6 +491,26 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
@@ -506,6 +507,26 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
return GsonHelper.toStableString(Serializer.toJsonTree(text));
}
@ -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 19a64b582bc042e426220e080d9c21b3a82cf3f7..1a38f82eb4650fcc0e0db8cb76f1ea1249703c02 100644
index f925a8d550ecbf2044a37bfe58b30d6578c5f6af..ec379f87fafd7c7ffb5139a7c192d562e3f178ad 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2304,12 +2304,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2301,12 +2301,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");

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 ff31e7de543ee82e01b7d80382874732314504d6..68c9de9121d9e60e509b38b5e866d87d3782bd6a 100644
index 5e105ed98ce3a1ec4b3acc98f57a526404fa1052..fc5f997f70ee35d666db6941c16e0b34726bb2b2 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 ff31e7de543ee82e01b7d80382874732314504d6..68c9de9121d9e60e509b38b5e866d87d
import com.google.common.collect.Lists;
import com.google.common.primitives.Floats;
import com.mojang.brigadier.ParseResults;
@@ -1985,6 +1986,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -2073,6 +2074,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Entity entity = packet.getEntity(worldserver);
if (entity != null) {

View File

@ -5,10 +5,10 @@ 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 68c9de9121d9e60e509b38b5e866d87d3782bd6a..578568d841174b0d4adfda1916d30ac979df4b62 100644
index fc5f997f70ee35d666db6941c16e0b34726bb2b2..6928add0c56541addb6e1fbffaa8eeb683bd947e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -31,6 +31,8 @@ import java.util.function.UnaryOperator;
@@ -29,6 +29,8 @@ import java.util.function.UnaryOperator;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.Nullable;
@ -17,7 +17,7 @@ index 68c9de9121d9e60e509b38b5e866d87d3782bd6a..578568d841174b0d4adfda1916d30ac9
import net.minecraft.ChatFormatting;
import net.minecraft.CrashReport;
import net.minecraft.CrashReportCategory;
@@ -2846,6 +2848,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -3065,6 +3067,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 68c9de9121d9e60e509b38b5e866d87d3782bd6a..578568d841174b0d4adfda1916d30ac9
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
@@ -2865,6 +2868,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -3086,6 +3089,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 5a8d4421c2de0680a3f4880451badcf5c4b46597..70b8e04d1b3081381956eaa969cbfbc6c91e1f45 100644
index 6928add0c56541addb6e1fbffaa8eeb683bd947e..1cc97e98f09db4e3ab8ceeaca4763d912a97dab6 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1303,7 +1303,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@@ -1371,7 +1371,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleBlockEntityTagQuery(ServerboundBlockEntityTagQuery packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());