Update Paper

This commit is contained in:
Telesphoreo 2023-05-12 19:30:27 -07:00
parent 8137fc3be6
commit d984c7c69d
10 changed files with 34 additions and 34 deletions

View File

@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
version=1.19.4-R0.1-SNAPSHOT
mcVersion=1.19.4
paperRef=1d4c7806ffd09cc9ff3372793a60418ee6a869f0
paperRef=9daa019d6c0b03f18c57a995f6ca24aaa32f5a5a
org.gradle.caching=true
org.gradle.parallel=true

View File

@ -64,10 +64,10 @@ index 9f15d9dbdfa74a0640b1a2b4ff695609d4758a4c..c048169628a53462baf2e41813645971
public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f9a9d2bb7b6d1bf4a0931438de4d8c7ee0757479..ccc578bf2d7edfe866a5892978ce9e116787c4b4 100644
index e769f7b0904814ee63e2a73dca57e5dc33382fba..73e9be92c44ca7ae72d532e6f23d1f1c3504b35d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -256,7 +256,7 @@ import javax.annotation.Nullable; // Paper
@@ -257,7 +257,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {

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 04a92f33f15d1696e38d38839651adf7d0462cac..f0d83628bd1fae7075713629dd0acccc22a462a6 100644
index aa287d7f37f38d938d195114408cb6dbda59063d..80384bf470da2da2d6214a9d3429c8556aa18320 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1921,6 +1921,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1922,6 +1922,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Spigot end
@ -28,7 +28,7 @@ index 04a92f33f15d1696e38d38839651adf7d0462cac..f0d83628bd1fae7075713629dd0acccc
@Override
public void handleUseItemOn(ServerboundUseItemOnPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
@@ -3339,17 +3351,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3345,17 +3357,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

@ -6,7 +6,7 @@ Subject: [PATCH] Limit amount of vehicle collision checks to 3 and discard
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
index 9a80cf593bbdd7681bc9395daf4545a98e07636f..9c50f8f917f1d0f795f88493cf0177266942f680 100644
index ee4f924afe15c9a4d96af7a55b357076c7b28501..939e4ef5a2fcedce6dfc08f1ee618bb9f21226ef 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -8,6 +8,7 @@ import com.mojang.datafixers.util.Pair;
@ -17,7 +17,7 @@ index 9a80cf593bbdd7681bc9395daf4545a98e07636f..9c50f8f917f1d0f795f88493cf017726
import javax.annotation.Nullable;
import net.minecraft.BlockUtil;
import net.minecraft.Util;
@@ -105,6 +106,7 @@ public abstract class AbstractMinecart extends Entity {
@@ -106,6 +107,7 @@ public abstract class AbstractMinecart extends Entity {
private double flyingX = 0.949999988079071D; // Paper - restore vanilla precision
private double flyingY = 0.949999988079071D; // Paper - restore vanilla precision
private double flyingZ = 0.949999988079071D; // Paper - restore vanilla precision
@ -25,7 +25,7 @@ index 9a80cf593bbdd7681bc9395daf4545a98e07636f..9c50f8f917f1d0f795f88493cf017726
public double maxSpeed = 0.4D;
// CraftBukkit end
@@ -431,8 +433,10 @@ public abstract class AbstractMinecart extends Entity {
@@ -432,8 +434,10 @@ public abstract class AbstractMinecart extends Entity {
if (this.getMinecartType() == AbstractMinecart.Type.RIDEABLE && this.getDeltaMovement().horizontalDistanceSqr() > 0.01D) {
List<Entity> list = this.level.getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D), EntitySelector.pushableBy(this));
@ -38,7 +38,7 @@ index 9a80cf593bbdd7681bc9395daf4545a98e07636f..9c50f8f917f1d0f795f88493cf017726
Entity entity = (Entity) list.get(l);
if (!(entity instanceof Player) && !(entity instanceof IronGolem) && !(entity instanceof AbstractMinecart) && !this.isVehicle() && !entity.isPassenger()) {
@@ -459,6 +463,16 @@ public abstract class AbstractMinecart extends Entity {
@@ -460,6 +464,16 @@ public abstract class AbstractMinecart extends Entity {
entity.push(this);
}
}
@ -56,7 +56,7 @@ index 9a80cf593bbdd7681bc9395daf4545a98e07636f..9c50f8f917f1d0f795f88493cf017726
} else {
Iterator iterator = this.level.getEntities(this, this.getBoundingBox().inflate(0.20000000298023224D, 0.0D, 0.20000000298023224D)).iterator();
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
index 5095e47b4910167235afdd8f1a7e9c45124ecadb..119888c529aa681cb97d01e80ee0f74644dc0577 100644
index 12e3209c5246ede89daaf8455fe70b4a517e12f6..a1480258f3713ea32dc0a2f6c651fd95924214da 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
@@ -5,6 +5,7 @@ import com.google.common.collect.UnmodifiableIterator;
@ -67,7 +67,7 @@ index 5095e47b4910167235afdd8f1a7e9c45124ecadb..119888c529aa681cb97d01e80ee0f746
import javax.annotation.Nullable;
import net.minecraft.BlockUtil;
import net.minecraft.core.BlockPos;
@@ -108,6 +109,7 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
@@ -109,6 +110,7 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
public double unoccupiedDeceleration = -1;
public boolean landBoats = false;
// CraftBukkit end
@ -75,7 +75,7 @@ index 5095e47b4910167235afdd8f1a7e9c45124ecadb..119888c529aa681cb97d01e80ee0f746
public Boat(EntityType<? extends Boat> type, Level world) {
super(type, world);
@@ -420,10 +422,12 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
@@ -421,10 +423,12 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
this.checkInsideBlocks();
List<Entity> list = this.level.getEntities((Entity) this, this.getBoundingBox().inflate(0.20000000298023224D, -0.009999999776482582D, 0.20000000298023224D), EntitySelector.pushableBy(this));
@ -90,7 +90,7 @@ index 5095e47b4910167235afdd8f1a7e9c45124ecadb..119888c529aa681cb97d01e80ee0f746
Entity entity = (Entity) list.get(j);
if (!entity.hasPassenger((Entity) this)) {
@@ -434,6 +438,16 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
@@ -435,6 +439,16 @@ public class Boat extends Entity implements VariantHolder<Boat.Type> {
}
}
}

View File

@ -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 9a1e8589e6b371869b2199650172d61ae186c907..c0aa5f450b5398c267569066d9aedfbb14f6559a 100644
index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..234362618f40a91509deb1d4d7f537d86a68df77 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2352,12 +2352,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2353,12 +2353,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 8bdcae709d9e4ae916d21eb8efe8c387603b1665..4d571eb214a189b54c96aae81e1a2a5c69b06501 100644
index 80384bf470da2da2d6214a9d3429c8556aa18320..cf0bd9aba6de16e8061d5f8b4268969fe812fa37 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 8bdcae709d9e4ae916d21eb8efe8c387603b1665..4d571eb214a189b54c96aae81e1a2a5c
import com.google.common.collect.Lists;
import com.google.common.primitives.Floats;
import com.mojang.brigadier.ParseResults;
@@ -2067,6 +2068,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2068,6 +2069,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 1ec6a72dce3856f474e31398275d9a14fc31c517..970606ba9e5a590acce39aead4a5490a335a4149 100644
index cf0bd9aba6de16e8061d5f8b4268969fe812fa37..f5f94b7a7f7055dd9dfeb0da161de3553b8e7d38 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 1ec6a72dce3856f474e31398275d9a14fc31c517..970606ba9e5a590acce39aead4a5490a
import net.minecraft.ChatFormatting;
import net.minecraft.CrashReport;
import net.minecraft.CrashReportCategory;
@@ -2981,6 +2983,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2987,6 +2989,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 1ec6a72dce3856f474e31398275d9a14fc31c517..970606ba9e5a590acce39aead4a5490a
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
@@ -3002,6 +3005,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3008,6 +3011,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 acdf0f705649a7569cb81a96c848a286d60bc44e..ef21a5eed89f9a4883a19ade4093bbb7a3b5b594 100644
index f5f94b7a7f7055dd9dfeb0da161de3553b8e7d38..5c347c8ff0eb3eb500a7bd49d61fb19925d780ce 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1371,7 +1371,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1372,7 +1372,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 6c338e02d21d623a305117e5d722657d4e38c1db..5d193b8ce96d4f717b124b91a2ec5e20210c3102 100644
index 5c347c8ff0eb3eb500a7bd49d61fb19925d780ce..2549ff41d1d63ba0dbdaee3e526a44f953945b6d 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 6c338e02d21d623a305117e5d722657d4e38c1db..5d193b8ce96d4f717b124b91a2ec5e20
import me.totalfreedom.scissors.event.player.SpectatorTeleportEvent;
import com.google.common.collect.Lists;
import com.google.common.primitives.Floats;
@@ -2371,6 +2372,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2377,6 +2378,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Optional<LastSeenMessages> optional = this.lastSeenMessages.applyUpdate(acknowledgment);
if (optional.isEmpty()) {
@ -509,7 +509,7 @@ index 6c338e02d21d623a305117e5d722657d4e38c1db..5d193b8ce96d4f717b124b91a2ec5e20
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
}
@@ -2603,11 +2610,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -2609,11 +2616,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleChatAck(ServerboundChatAckPacket packet) {
LastSeenMessagesValidator lastseenmessagesvalidator = this.lastSeenMessages;
@ -663,10 +663,10 @@ index 4da4edae517a0efec6e03a719ec47b700509dab1..837b20be528bc33f62c0c675d90afebd
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e1f92c153bb7b616a9c2a77aa07c1c20cf80a94a..8076460b9b307152191df0cd1b523ea8cbfa1bbe 100644
index 73e9be92c44ca7ae72d532e6f23d1f1c3504b35d..70f3448929acdb44d18187357402c5fd22aed189 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 {
@@ -956,6 +956,7 @@ public final class CraftServer implements Server {
}
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
@ -674,7 +674,7 @@ index e1f92c153bb7b616a9c2a77aa07c1c20cf80a94a..8076460b9b307152191df0cd1b523ea8
this.console.paperConfigurations.reloadConfigs(this.console);
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
@@ -986,6 +987,7 @@ public final class CraftServer implements Server {
@@ -987,6 +988,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
@ -682,7 +682,7 @@ index e1f92c153bb7b616a9c2a77aa07c1c20cf80a94a..8076460b9b307152191df0cd1b523ea8
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -2740,6 +2742,12 @@ public final class CraftServer implements Server {
@@ -2741,6 +2743,12 @@ public final class CraftServer implements Server {
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}
@ -696,7 +696,7 @@ index e1f92c153bb7b616a9c2a77aa07c1c20cf80a94a..8076460b9b307152191df0cd1b523ea8
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 e9714552bd57b8f65c2b5b209a72bfdd735b0dd3..681b4c4dee006e4ac7fdf879a0e2c528557c5a93 100644
index 8bd5c9cd539fea052881df58ac9f5b5204391ab3..c5495e2f74d0009fa99c9c190dab1910df267af3 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 {

View File

@ -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 67a5495c4048a40656b6b7b8ba2b9d1a78d88335..02c3a3aea71e7168f7953de0d39a9ea081dd8581 100644
index 234362618f40a91509deb1d4d7f537d86a68df77..127373f731fa3a15fe501a97887275166ea6ce30 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4480,7 +4480,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4481,7 +4481,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public void setYRot(float yaw) {
if (!Float.isFinite(yaw)) {
@ -19,7 +19,7 @@ index 67a5495c4048a40656b6b7b8ba2b9d1a78d88335..02c3a3aea71e7168f7953de0d39a9ea0
} else {
this.yRot = yaw;
}
@@ -4492,7 +4494,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4493,7 +4495,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public void setXRot(float pitch) {
if (!Float.isFinite(pitch)) {