Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-14 20:10:05 +01:00
Allow server administrators to disable book size checks (#10457)
Dieser Commit ist enthalten in:
Ursprung
dae906ba45
Commit
ba1b0162fa
@ -487,10 +487,10 @@ index 0000000000000000000000000000000000000000..d9502ba028a96f9cc846f9ed428bd806
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e727414d784debd276dcc42aabf588d6fcbccc91
|
||||
index 0000000000000000000000000000000000000000..45ab7ff5497ceccb85944d2e8d354d9c860abf3b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -0,0 +1,323 @@
|
||||
@@ -0,0 +1,324 @@
|
||||
+package io.papermc.paper.configuration;
|
||||
+
|
||||
+import co.aikar.timings.MinecraftTimings;
|
||||
@ -513,6 +513,7 @@ index 0000000000000000000000000000000000000000..e727414d784debd276dcc42aabf588d6
|
||||
+import java.util.List;
|
||||
+import java.util.Map;
|
||||
+import java.util.Objects;
|
||||
+import java.util.OptionalInt;
|
||||
+
|
||||
+@SuppressWarnings({"CanBeFinal", "FieldCanBeLocal", "FieldMayBeFinal", "NotNullFieldNotInitialized", "InnerClassMayBeStatic"})
|
||||
+public class GlobalConfiguration extends ConfigurationPart {
|
||||
@ -723,7 +724,7 @@ index 0000000000000000000000000000000000000000..e727414d784debd276dcc42aabf588d6
|
||||
+ public BookSize bookSize;
|
||||
+
|
||||
+ public class BookSize extends ConfigurationPart {
|
||||
+ public int pageMax = 2560; // TODO this appears to be a duplicate setting with one above
|
||||
+ public IntOr.Disabled pageMax = new IntOr.Disabled(OptionalInt.of(2560)); // TODO this appears to be a duplicate setting with one above
|
||||
+ public double totalMultiplier = 0.98D; // TODO this should probably be merged into the above inner class
|
||||
+ }
|
||||
+ public boolean resolveSelectorsInBooks = false;
|
||||
|
@ -22,18 +22,19 @@ index ed61767a64cdce37dc7c226ebd0d693a60de24a9..f634a830a2b58a419e84f969bd53eeae
|
||||
ServerboundEditBookPacket::new
|
||||
);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ce06a41d98bafc878918507404bd5d6cabc45776..aff0f55623365130f079818af9d6a2e448cfe342 100644
|
||||
index ce06a41d98bafc878918507404bd5d6cabc45776..d8f940016b68f488b5061d2826607c0db7e8f852 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1043,6 +1043,43 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1043,6 +1043,44 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handleEditBook(ServerboundEditBookPacket packet) {
|
||||
+ // Paper start - Book size limits
|
||||
+ if (!this.cserver.isPrimaryThread()) {
|
||||
+ final io.papermc.paper.configuration.type.number.IntOr.Disabled pageMax = io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.pageMax;
|
||||
+ if (!this.cserver.isPrimaryThread() && pageMax.enabled()) {
|
||||
+ final List<String> pageList = packet.pages();
|
||||
+ long byteTotal = 0;
|
||||
+ final int maxBookPageSize = io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.pageMax;
|
||||
+ final int maxBookPageSize = pageMax.intValue();
|
||||
+ final double multiplier = Math.clamp(io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.bookSize.totalMultiplier, 0.3D, 1D);
|
||||
+ long byteAllowed = maxBookPageSize;
|
||||
+ for (final String page : pageList) {
|
||||
|
@ -22,7 +22,7 @@ it only impacts data sent from the client.
|
||||
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c8c64a55f6470e161a595279e0d9016b7ab63a93..6a8e6f518919a40f32dbdce5f112e2fb004882c4 100644
|
||||
index 33a7aaf8c6b73b1732465125edd43cce06da7dc9..88fa94f33e5939bc8a5acb20f48ad5bdf35c2ada 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -299,6 +299,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -33,7 +33,7 @@ index c8c64a55f6470e161a595279e0d9016b7ab63a93..6a8e6f518919a40f32dbdce5f112e2fb
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
|
||||
super(server, connection, clientData, player); // CraftBukkit
|
||||
@@ -3149,7 +3150,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3150,7 +3151,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index cd2d2178746a53906b1dc253d73c01ffd24d616d..6ecf770c279dec421627d9b3a04d7c588056c391 100644
|
||||
index 5dcb459b7ae7f31375e982501e7f16beb913114f..175fef59a8853727e58ba48e46009df17d8e7b6e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1551,6 +1551,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1552,6 +1552,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
|
||||
|
@ -13,10 +13,10 @@ behaviour, we need to move all of this dangerous logic outside
|
||||
of the move call and into an appropriate place in the tick method.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6ecf770c279dec421627d9b3a04d7c588056c391..8e607b86ba854bf3a3bcf35d3eeeb406a82323c9 100644
|
||||
index 175fef59a8853727e58ba48e46009df17d8e7b6e..c466e405b123ddcd3abe931f83930369ab668b90 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1348,6 +1348,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1349,6 +1349,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
this.player.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerRecipeBookClickEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8e607b86ba854bf3a3bcf35d3eeeb406a82323c9..f9e1dbc5a2690492f837db7b9c196c853c091908 100644
|
||||
index c466e405b123ddcd3abe931f83930369ab668b90..bba23db382a99ea3456bd6aefc437d9f4077705a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3056,16 +3056,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3057,16 +3057,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
if (!this.player.containerMenu.stillValid(this.player)) {
|
||||
ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
|
||||
} else {
|
||||
|
@ -76,10 +76,10 @@ index d6dc8c983d26ce89f17a990be4284fdc78ad164b..2b1d7a2360a9ee7bca9d93a2dc8c61d1
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 53162e8373acce77ab5dd873ddf734aef8dbf3e9..561ffd0cc579227092c501f29007333d70f103e5 100644
|
||||
index 15db3eaaab7471e6dde0a4f0d6ca2a1c38a3eb2d..0db5407cdf08d63e520db9b847bc9fcae8f585c7 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3259,7 +3259,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3260,7 +3260,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 561ffd0cc579227092c501f29007333d70f103e5..36f89eee2506a65cfd344042d4de2a18eba3ff7f 100644
|
||||
index 0db5407cdf08d63e520db9b847bc9fcae8f585c7..f0e60add7df4d00ee5b84164a532b75f9d90cfa8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3251,6 +3251,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3252,6 +3252,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@Override
|
||||
public void handleClientInformation(ServerboundClientInformationPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
|
@ -9,7 +9,7 @@ as this is how Vanilla teleports entities.
|
||||
Cancel any pending motion when teleported.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 36f89eee2506a65cfd344042d4de2a18eba3ff7f..fd12b5e386e4582f605266b7840c73c7c8d582b1 100644
|
||||
index f0e60add7df4d00ee5b84164a532b75f9d90cfa8..a7b270c0ba76f25876c4bb7bda60e61a670d15d9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -679,7 +679,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -21,7 +21,7 @@ index 36f89eee2506a65cfd344042d4de2a18eba3ff7f..fd12b5e386e4582f605266b7840c73c7
|
||||
this.lastGoodX = this.awaitingPositionFromClient.x;
|
||||
this.lastGoodY = this.awaitingPositionFromClient.y;
|
||||
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
||||
@@ -1593,7 +1593,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1594,7 +1594,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// CraftBukkit end
|
||||
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fix for large move vectors crashing server
|
||||
Check movement distance also based on current position.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index fd12b5e386e4582f605266b7840c73c7c8d582b1..0475be28b412c8aa0f89e0f4bdab2cd54839d1bb 100644
|
||||
index a7b270c0ba76f25876c4bb7bda60e61a670d15d9..172a1acdbdfb639ca4fc6f880570a7829c8b3d45 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -492,9 +492,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -53,7 +53,7 @@ index fd12b5e386e4582f605266b7840c73c7c8d582b1..0475be28b412c8aa0f89e0f4bdab2cd5
|
||||
boolean flag1 = entity.verticalCollisionBelow;
|
||||
|
||||
if (entity instanceof LivingEntity) {
|
||||
@@ -1252,7 +1261,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1253,7 +1262,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
double d7 = d1 - this.firstGoodY;
|
||||
double d8 = d2 - this.firstGoodZ;
|
||||
double d9 = this.player.getDeltaMovement().lengthSqr();
|
||||
@ -71,7 +71,7 @@ index fd12b5e386e4582f605266b7840c73c7c8d582b1..0475be28b412c8aa0f89e0f4bdab2cd5
|
||||
|
||||
if (this.player.isSleeping()) {
|
||||
if (d10 > 1.0D) {
|
||||
@@ -1308,9 +1326,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1309,9 +1327,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
AABB axisalignedbb = this.player.getBoundingBox();
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0475be28b412c8aa0f89e0f4bdab2cd54839d1bb..58b0df52a1abcdc6332ac51020e44bad87e54596 100644
|
||||
index 172a1acdbdfb639ca4fc6f880570a7829c8b3d45..4bc7ca9ec9eecf3172cf2140a7d2a07c7c708482 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -266,6 +266,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -24,7 +24,7 @@ index 0475be28b412c8aa0f89e0f4bdab2cd54839d1bb..58b0df52a1abcdc6332ac51020e44bad
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -3068,6 +3070,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3069,6 +3071,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
|
||||
|
@ -11,10 +11,10 @@ Subject: [PATCH] Fix interact event not being called sometimes
|
||||
Co-authored-by: Moulberry <james.jenour@protonmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 58b0df52a1abcdc6332ac51020e44bad87e54596..56d13a402a57def163f7ffb5360a27909f8acd19 100644
|
||||
index 4bc7ca9ec9eecf3172cf2140a7d2a07c7c708482..b96490d16d9a38be14d6777213d883f2223fd5a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1769,7 +1769,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1770,7 +1770,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED);
|
||||
|
||||
this.player.sendSystemMessage(ichatmutablecomponent, true);
|
||||
@ -23,7 +23,7 @@ index 58b0df52a1abcdc6332ac51020e44bad87e54596..56d13a402a57def163f7ffb5360a2790
|
||||
this.player.swing(enumhand, true);
|
||||
}
|
||||
}
|
||||
@@ -2390,13 +2390,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2391,13 +2391,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
double d3 = Math.max(this.player.blockInteractionRange(), this.player.entityInteractionRange());
|
||||
// SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time
|
||||
// SPIGOT-7429: Make sure to call PlayerInteractEvent for spectators and non-pickable entities
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow using signs inside spawn protection
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 56d13a402a57def163f7ffb5360a27909f8acd19..4d522309f4682089b2c982e49720a847265a8acf 100644
|
||||
index b96490d16d9a38be14d6777213d883f2223fd5a4..1cff57113816614c5b6a43056bb47f29c5839cc5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1757,8 +1757,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1758,8 +1758,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
int i = this.player.level().getMaxBuildHeight();
|
||||
|
||||
if (blockposition.getY() < i) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't ignore result of PlayerEditBookEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 4d522309f4682089b2c982e49720a847265a8acf..fb78890ad229f7ead611e8b4ceb759e9ad24728e 100644
|
||||
index 1cff57113816614c5b6a43056bb47f29c5839cc5..0b6db265a2a7a20be647bf6e3387af20634af68c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1153,7 +1153,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1154,7 +1154,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
List<Filterable<String>> list1 = pages.stream().map(this::filterableFromOutgoing).toList();
|
||||
|
||||
itemstack.set(DataComponents.WRITABLE_BOOK_CONTENT, new WritableBookContent(list1));
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index fb78890ad229f7ead611e8b4ceb759e9ad24728e..5c16b407076a45748db9c4dd5906f6abae1af6dd 100644
|
||||
index 0b6db265a2a7a20be647bf6e3387af20634af68c..4b9b8cda8578c871c677f283ba0746460a0fadf0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1932,6 +1932,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1933,6 +1933,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
if (this.player.isImmobile()) return; // CraftBukkit
|
||||
if (packet.getSlot() >= 0 && packet.getSlot() < Inventory.getSelectionSize()) {
|
||||
|
@ -134,10 +134,10 @@ index 5de472df78940d1b8320f73d18b2edf3a796227e..073cf184a0e7af41048ae67a9b17b4cd
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 5c16b407076a45748db9c4dd5906f6abae1af6dd..ca814548e94214f1ab356dd803940a5047a87baa 100644
|
||||
index 4b9b8cda8578c871c677f283ba0746460a0fadf0..baa01aaeeb710f160c470702649356e5be124fa9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2730,7 +2730,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2731,7 +2731,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
this.player = this.server.getPlayerList().respawn(this.player, false, Entity.RemovalReason.KILLED, RespawnReason.DEATH); // CraftBukkit
|
||||
if (this.server.isHardcore()) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Move range check for block placing up
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ca814548e94214f1ab356dd803940a5047a87baa..b63ffe1f67403db42c9f48147b9a349680f05b9c 100644
|
||||
index baa01aaeeb710f160c470702649356e5be124fa9..0ac4cb57f379b2b96391ab651fc75bc599ddc928 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1744,6 +1744,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1745,6 +1745,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
if (itemstack.isItemEnabled(worldserver.enabledFeatures())) {
|
||||
BlockHitResult movingobjectpositionblock = packet.getHitResult();
|
||||
Vec3 vec3d = movingobjectpositionblock.getLocation();
|
||||
|
@ -87,10 +87,10 @@ index d6d7f1c446ba5507f67038ff27775ba75156f4a7..c63c194c44646e6bc1a5942655278701
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index b63ffe1f67403db42c9f48147b9a349680f05b9c..fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6 100644
|
||||
index 0ac4cb57f379b2b96391ab651fc75bc599ddc928..757f0aa42ee945fda11d05864405f9ecb5208226 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2549,6 +2549,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2550,6 +2550,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Spigot Start
|
||||
public SocketAddress getRawAddress()
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ index 24bf661e76fb421a8be565d9ea68edf7205254d2..feb529adf2168025c785ab92d95a3246
|
||||
if (this.cserver.getServer().isRunning()) {
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc61ece2a4 100644
|
||||
index 757f0aa42ee945fda11d05864405f9ecb5208226..f098997bab367e50781e3062fd2de73454a711a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -349,7 +349,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -284,7 +284,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
return;
|
||||
}
|
||||
this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed
|
||||
@@ -1109,14 +1109,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1110,14 +1110,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
if (byteTotal > byteAllowed) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} tried to send a book too large. Book size: {} - Allowed: {} - Pages: {}", this.player.getScoreboardName(), byteTotal, byteAllowed, pageList.size());
|
||||
@ -301,7 +301,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
return;
|
||||
}
|
||||
this.lastBookTick = MinecraftServer.currentTick;
|
||||
@@ -1228,7 +1228,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1229,7 +1229,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
public void handleMovePlayer(ServerboundMovePlayerPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(0.0D), packet.getY(0.0D), packet.getZ(0.0D), packet.getYRot(0.0F), packet.getXRot(0.0F))) {
|
||||
@ -310,7 +310,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
} else {
|
||||
ServerLevel worldserver = this.player.serverLevel();
|
||||
|
||||
@@ -1666,7 +1666,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1667,7 +1667,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.dropCount++;
|
||||
if (this.dropCount >= 20) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!");
|
||||
@ -319,7 +319,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1954,7 +1954,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1955,7 +1955,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.player.resetLastActionTime();
|
||||
} else {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString());
|
||||
@ -328,7 +328,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2152,7 +2152,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2153,7 +2153,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
private void tryHandleChat(String s, Runnable runnable, boolean sync) { // CraftBukkit
|
||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(s)) {
|
||||
@ -337,7 +337,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
} else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
|
||||
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
|
||||
} else {
|
||||
@@ -2175,7 +2175,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2176,7 +2176,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
if (optional.isEmpty()) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
|
||||
@ -346,7 +346,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
}
|
||||
|
||||
return optional;
|
||||
@@ -2361,7 +2361,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2362,7 +2362,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// this.chatSpamTickCount += 20;
|
||||
if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile())) {
|
||||
// CraftBukkit end
|
||||
@ -355,7 +355,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2373,7 +2373,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2374,7 +2374,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
synchronized (this.lastSeenMessages) {
|
||||
if (!this.lastSeenMessages.applyOffset(packet.offset())) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
|
||||
@ -364,7 +364,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2521,7 +2521,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2522,7 +2522,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
if (i > 4096) {
|
||||
@ -373,7 +373,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2579,7 +2579,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2580,7 +2580,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Spigot Start
|
||||
if ( entity == this.player && !this.player.isSpectator() )
|
||||
{
|
||||
@ -382,7 +382,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
return;
|
||||
}
|
||||
// Spigot End
|
||||
@@ -2693,7 +2693,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2694,7 +2694,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
|
||||
}
|
||||
});
|
||||
@@ -3090,7 +3090,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3091,7 +3091,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Paper start - auto recipe limit
|
||||
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
||||
@ -400,7 +400,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -3332,7 +3332,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3333,7 +3333,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
if (!Objects.equals(profilepublickey_a, profilepublickey_a1)) {
|
||||
if (profilepublickey_a != null && profilepublickey_a1.expiresAt().isBefore(profilepublickey_a.expiresAt())) {
|
||||
@ -409,7 +409,7 @@ index fcbdf2c6efe8229a0f82ae4a730f2217aa6a76f6..703543684461acb38f99bf0f2b100ffc
|
||||
} else {
|
||||
try {
|
||||
SignatureValidator signaturevalidator = this.server.getProfileKeySignatureValidator();
|
||||
@@ -3345,7 +3345,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3346,7 +3346,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator));
|
||||
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage());
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerArmSwingEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 703543684461acb38f99bf0f2b100ffc61ece2a4..10cd79cb1452f15a1d0c8957023314c97dc4bc96 100644
|
||||
index f098997bab367e50781e3062fd2de73454a711a3..9095e6eb99cb00af976ffa48ecbbc69a0c9c931c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2411,7 +2411,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2412,7 +2412,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
} // Paper end - Call interact event
|
||||
|
||||
// Arm swing animation
|
||||
|
@ -55,10 +55,10 @@ index feb529adf2168025c785ab92d95a3246e73c0236..b43f87ff4b9853b5d4bbea5ff9686d64
|
||||
MinecraftServer minecraftserver = this.server;
|
||||
Connection networkmanager = this.connection;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 10cd79cb1452f15a1d0c8957023314c97dc4bc96..90cde6b752e0c09d47d719bbe9641a162f63ed86 100644
|
||||
index 9095e6eb99cb00af976ffa48ecbbc69a0c9c931c..de07fd466c9ac79d6f8122c619f2b4be65f31f69 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1893,6 +1893,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1894,6 +1894,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void onDisconnect(DisconnectionDetails info) {
|
||||
@ -71,7 +71,7 @@ index 10cd79cb1452f15a1d0c8957023314c97dc4bc96..90cde6b752e0c09d47d719bbe9641a16
|
||||
// CraftBukkit start - Rarely it would send a disconnect line twice
|
||||
if (this.processedDisconnect) {
|
||||
return;
|
||||
@@ -1901,11 +1907,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1902,11 +1908,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// CraftBukkit end
|
||||
ServerGamePacketListenerImpl.LOGGER.info("{} lost connection: {}", this.player.getName().getString(), info.reason().getString());
|
||||
@ -91,7 +91,7 @@ index 10cd79cb1452f15a1d0c8957023314c97dc4bc96..90cde6b752e0c09d47d719bbe9641a16
|
||||
this.chatMessageChain.close();
|
||||
// CraftBukkit start - Replace vanilla quit message handling with our own.
|
||||
/*
|
||||
@@ -1915,7 +1927,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1916,7 +1928,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
this.player.disconnect();
|
||||
// Paper start - Adventure
|
||||
|
@ -17,10 +17,10 @@ Async catch modifications to critical entity state
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index eee9f019e71799a58911368458df759e707c1078..c909fd98d9fa59c7c4db290c7c3386225d8b4960 100644
|
||||
index dd96075fbffb9d912310d7c3d8a1348ade25c3ef..3762cd8bfd1544df5f5a2eefbd0490fe0c656cff 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1576,6 +1576,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1577,6 +1577,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 44850aedff2913a5faed4eef5e947edc6ed29281..422f7889c5d1fb87db725430ef19c9e1c64157d9 100644
|
||||
index a94c253758200ee91a911783a9505214ddd984ba..6091462cbdecfac5e6bcc92e6bbb45a680f03b05 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3200,7 +3200,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3201,7 +3201,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
BlockPos blockposition = BlockEntity.getPosFromTag(customdata.getUnsafe());
|
||||
|
||||
if (this.player.level().isLoaded(blockposition)) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 422f7889c5d1fb87db725430ef19c9e1c64157d9..a9183f4ee27a67a29c26e5ef27164f389c594077 100644
|
||||
index 6091462cbdecfac5e6bcc92e6bbb45a680f03b05..e804e08e8b99d10b513972bd42a1257a66baeff4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2382,7 +2382,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2383,7 +2383,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// Spigot end
|
||||
// this.chatSpamTickCount += 20;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] More Teleport API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a9183f4ee27a67a29c26e5ef27164f389c594077..5b18dbe258d41a2bdb1442497c5a1e812e624c35 100644
|
||||
index e804e08e8b99d10b513972bd42a1257a66baeff4..857f6dedacf0533856e26b0a9a6f8e25c1f7bad9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1564,11 +1564,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1565,11 +1565,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
return true; // CraftBukkit - Return event status
|
||||
}
|
||||
|
||||
|
@ -57,10 +57,10 @@ index 4d024956156aefde7df308642dfd0a40779e0633..6abecaac8407b992d208a9108e11fd49
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 5b18dbe258d41a2bdb1442497c5a1e812e624c35..e1c0f97b11efcc4008e81e9cd9b82d68c5205c57 100644
|
||||
index 857f6dedacf0533856e26b0a9a6f8e25c1f7bad9..3637eebdf9841b97e2086ce611af27c052ac0461 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1710,8 +1710,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1711,8 +1711,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
return;
|
||||
}
|
||||
// Paper end - Don't allow digging into unloaded chunks
|
||||
|
@ -22,10 +22,10 @@ is actually processed, this is honestly really just exposed for the misnomers or
|
||||
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index e727414d784debd276dcc42aabf588d6fcbccc91..b2031483a327e22116e2584b278c3f0d59bf90a6 100644
|
||||
index 45ab7ff5497ceccb85944d2e8d354d9c860abf3b..917bd0c1dd8f356edc3741ee59d24e4d090af182 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -295,7 +295,18 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -296,7 +296,18 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
@PostProcess
|
||||
private void postProcess() {
|
||||
|
@ -52,10 +52,10 @@ index aa39bdb0a4ba8fedf5052ea9700afa7d4d2a4300..b4af03c4bdd1ce0861f36c3b75fc7e89
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e1c0f97b11efcc4008e81e9cd9b82d68c5205c57..4ada3d66c946bd7e6755adb4d40e47708690c3c7 100644
|
||||
index 3637eebdf9841b97e2086ce611af27c052ac0461..a5e1d26bd0cb063b9bbc525eafaf7039ab84708f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3398,7 +3398,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3399,7 +3399,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator));
|
||||
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check
|
||||
Co-authored-by: david <mrminecraft00@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 4ada3d66c946bd7e6755adb4d40e47708690c3c7..d46cc9a7af7a396083197993c0b95a0cc73d609a 100644
|
||||
index a5e1d26bd0cb063b9bbc525eafaf7039ab84708f..3ca5fc1ec2e97164e2f905d9a8a3cbaa0ed23c64 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2056,7 +2056,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2057,7 +2057,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
private void performUnsignedChatCommand(String command) {
|
||||
// CraftBukkit start
|
||||
String command1 = "/" + command;
|
||||
@ -19,7 +19,7 @@ index 4ada3d66c946bd7e6755adb4d40e47708690c3c7..d46cc9a7af7a396083197993c0b95a0c
|
||||
|
||||
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command1, new LazyPlayerSet(this.server));
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -2096,7 +2098,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2097,7 +2099,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
private void performSignedChatCommand(ServerboundChatCommandSignedPacket packet, LastSeenMessages lastSeenMessages) {
|
||||
// CraftBukkit start
|
||||
String command = "/" + packet.command();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index d46cc9a7af7a396083197993c0b95a0cc73d609a..d83650ea63a6ec76efd0a46dc1eb0b4735b81490 100644
|
||||
index 3ca5fc1ec2e97164e2f905d9a8a3cbaa0ed23c64..111daa178ae9ad5a53266cf7e460f1213f9c5a88 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3436,7 +3436,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3437,7 +3437,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
|
||||
this.chatMessageChain.append(() -> {
|
||||
this.player.setChatSession(session);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Treat sequence violations like they should be
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index d83650ea63a6ec76efd0a46dc1eb0b4735b81490..6eee43f2005f4bc937f7411c17d431a3b95093c1 100644
|
||||
index 111daa178ae9ad5a53266cf7e460f1213f9c5a88..14256242c87a167dc35025f3d53e778a83adaadd 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1975,6 +1975,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1976,6 +1976,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
public void ackBlockChangesUpTo(int sequence) {
|
||||
if (sequence < 0) {
|
||||
|
@ -26,7 +26,7 @@ index 68c062cbaa030d62d97c9c003651f8fc17a00a6b..6247a21c9c391abf1f6db3482c659593
|
||||
UPDATE_GAME_MODE((serialized, buf) -> serialized.gameMode = GameType.byId(buf.readVarInt()), (buf, entry) -> buf.writeVarInt(entry.gameMode().getId())),
|
||||
UPDATE_LISTED((serialized, buf) -> serialized.listed = buf.readBoolean(), (buf, entry) -> buf.writeBoolean(entry.listed())),
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6eee43f2005f4bc937f7411c17d431a3b95093c1..a5d7a1769ca0fd32427a98b2029b787b549831e5 100644
|
||||
index 14256242c87a167dc35025f3d53e778a83adaadd..8130db188a7014cff572743b06ca14806bbacdc2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -295,6 +295,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -51,7 +51,7 @@ index 6eee43f2005f4bc937f7411c17d431a3b95093c1..a5d7a1769ca0fd32427a98b2029b787b
|
||||
}
|
||||
|
||||
private int getMaximumFlyingTicks(Entity vehicle) {
|
||||
@@ -3434,6 +3442,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3435,6 +3443,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
private void resetPlayerChatState(RemoteChatSession session) {
|
||||
this.chatSession = session;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bdeebce464e 100644
|
||||
index 8130db188a7014cff572743b06ca14806bbacdc2..a8d6d032605d2da10c84c71fca67998705ff27ff 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1259,8 +1259,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1260,8 +1260,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER
|
||||
double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; // Paper - OBFHELPER
|
||||
double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER
|
||||
@ -19,7 +19,7 @@ index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bde
|
||||
|
||||
if (this.player.isPassenger()) {
|
||||
this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
|
||||
@@ -1327,8 +1327,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1328,8 +1328,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) {
|
||||
@ -36,7 +36,7 @@ index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bde
|
||||
}
|
||||
// Paper end - Prevent moving into unloaded chunks
|
||||
|
||||
@@ -1337,9 +1343,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1338,9 +1344,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
||||
// CraftBukkit end
|
||||
@ -56,7 +56,7 @@ index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bde
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1401,14 +1414,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1402,14 +1415,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
d8 = d2 - this.player.getZ();
|
||||
d10 = d6 * d6 + d7 * d7 + d8 * d8;
|
||||
@ -91,7 +91,7 @@ index a5d7a1769ca0fd32427a98b2029b787b549831e5..62779e108793e2a90c4f1356ee840bde
|
||||
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
|
||||
} else {
|
||||
@@ -3465,4 +3495,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3466,4 +3496,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add slot sanity checks in container clicks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a5b7907485f91501edd9705294b1f8dc3dae9315..c9b77c0eb288b564effab5ee75e8cf6e8b5a0dca 100644
|
||||
index d14cb295fa3a3a2aa14efd58cccdaa9471955548..50f2834b803fb646ff177e56e1c3b1b11c033c83 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2985,6 +2985,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2986,6 +2986,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
break;
|
||||
case SWAP:
|
||||
if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add CartographyItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c9b77c0eb288b564effab5ee75e8cf6e8b5a0dca..4de7507139ff222d2ea3c6dd65e98bbf56e9263f 100644
|
||||
index 50f2834b803fb646ff177e56e1c3b1b11c033c83..39488b8547ccf19759ffbd5a38cbe3612253a4eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3107,6 +3107,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3108,6 +3108,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,10 +17,10 @@ index d9502ba028a96f9cc846f9ed428bd8066b857ca3..87e5f614ba988547a827486740db217e
|
||||
node = loader.load();
|
||||
this.verifyGlobalConfigVersion(node);
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index b2031483a327e22116e2584b278c3f0d59bf90a6..9db431ddb43e94d5e8dc3875d8d9c6fa5a05bbea 100644
|
||||
index 917bd0c1dd8f356edc3741ee59d24e4d090af182..f19b4a17a7e22969f7b51d3bea4056b41ab25484 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -26,6 +26,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -27,6 +27,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
static final int CURRENT_VERSION = 29; // (when you change the version, change the comment, so it conflicts on rebases): <insert changes here>
|
||||
private static GlobalConfiguration instance;
|
||||
|
@ -2356,10 +2356,10 @@ index b4af03c4bdd1ce0861f36c3b75fc7e89d701c46a..0761d5bc5f2813bb4a9f664ac7a05b97
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8952b0351ab9e747ae51d2b2c538aac1e996545d..1da3c0304d5900eac180a22c0875186438e8d441 100644
|
||||
index ef5832259de0a78292b52829dca8e2e3d3836595..94b4375f303b6376fa2a59b075146db5bbdd19c8 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2406,33 +2406,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2407,33 +2407,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,10 +209,10 @@ index 0e7ace92522fbd4cef7b2c2b8a0f8b86c2cce192..1d849ce4e2c85f149af25318b8ffb6dc
|
||||
((LivingEntity) this.entity).detectEquipmentUpdatesPublic(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1da3c0304d5900eac180a22c0875186438e8d441..0e1384f6231e03ea7c71d6e48f490ab70011317a 100644
|
||||
index 94b4375f303b6376fa2a59b075146db5bbdd19c8..b9286e0784c8d1f99cf6ab58297a382fa3b8585e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2730,7 +2730,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2731,7 +2731,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
entity.refreshEntityData(ServerGamePacketListenerImpl.this.player);
|
||||
// SPIGOT-7136 - Allays
|
||||
if (entity instanceof Allay) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate InvAction#HOTBAR_MOVE_AND_READD
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0e1384f6231e03ea7c71d6e48f490ab70011317a..2d334e938fe17e57496999ccbfee752db048c53d 100644
|
||||
index b9286e0784c8d1f99cf6ab58297a382fa3b8585e..50a8ea1af21c374215cbce85e16bbdebc346d49c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2996,14 +2996,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2997,14 +2997,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
Slot clickedSlot = this.player.containerMenu.getSlot(packet.getSlotNum());
|
||||
if (clickedSlot.mayPickup(this.player)) {
|
||||
ItemStack hotbar = this.player.getInventory().getItem(packet.getButtonNum());
|
||||
|
@ -22216,10 +22216,10 @@ index 0000000000000000000000000000000000000000..85950a1aa732ab8c01ad28bec9e0de14
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index 9db431ddb43e94d5e8dc3875d8d9c6fa5a05bbea..214ea75502d4abf9ebbc99a3811e4d2f8465227e 100644
|
||||
index f19b4a17a7e22969f7b51d3bea4056b41ab25484..690086adcb1f87adc0b3ab664fde735ad3e1093a 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -30,6 +30,45 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -31,6 +31,45 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public static GlobalConfiguration get() {
|
||||
return instance;
|
||||
}
|
||||
@ -22265,7 +22265,7 @@ index 9db431ddb43e94d5e8dc3875d8d9c6fa5a05bbea..214ea75502d4abf9ebbc99a3811e4d2f
|
||||
static void set(GlobalConfiguration instance) {
|
||||
GlobalConfiguration.instance = instance;
|
||||
}
|
||||
@@ -138,21 +177,6 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -139,21 +178,6 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public int incomingPacketThreshold = 300;
|
||||
}
|
||||
|
||||
@ -22287,7 +22287,7 @@ index 9db431ddb43e94d5e8dc3875d8d9c6fa5a05bbea..214ea75502d4abf9ebbc99a3811e4d2f
|
||||
public UnsupportedSettings unsupportedSettings;
|
||||
|
||||
public class UnsupportedSettings extends ConfigurationPart {
|
||||
@@ -211,7 +235,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -212,7 +236,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
@PostProcess
|
||||
private void postProcess() {
|
||||
|
@ -81,10 +81,10 @@ index e9dcdb1e09e84a9b451034ff4bdfa6eae2dd1c04..24b1715397ba8e6f5e9841a030d0e3d9
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2d334e938fe17e57496999ccbfee752db048c53d..13887e050d8d40924212f7fb0bf43054c042a294 100644
|
||||
index 50a8ea1af21c374215cbce85e16bbdebc346d49c..1e17d05bb6b7254e4d55b1f33cea24e1c4ef42ae 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1947,6 +1947,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1948,6 +1948,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
if (cancelled) {
|
||||
@ -92,7 +92,7 @@ index 2d334e938fe17e57496999ccbfee752db048c53d..13887e050d8d40924212f7fb0bf43054
|
||||
this.player.getBukkitEntity().updateInventory(); // SPIGOT-2524
|
||||
return;
|
||||
}
|
||||
@@ -2716,7 +2717,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2717,7 +2718,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
|
||||
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
|
||||
|
@ -12,10 +12,10 @@ This value however may be too low in high latency environments.
|
||||
The patch exposes a new configuration option to configure said value.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 13887e050d8d40924212f7fb0bf43054c042a294..60d008840855e051b5faa0dae2bbfcdb40269620 100644
|
||||
index 1e17d05bb6b7254e4d55b1f33cea24e1c4ef42ae..16690c9f3c720139f552473da1bde2509b1aa094 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2701,7 +2701,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -2702,7 +2702,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
AABB axisalignedbb = entity.getBoundingBox();
|
||||
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Optimise collision checking in player move packet handling
|
||||
Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 60d008840855e051b5faa0dae2bbfcdb40269620..8837a6b19cab18eb47b7723236c7761c6661edda 100644
|
||||
index 16690c9f3c720139f552473da1bde2509b1aa094..9a77b6194fb92451a5db5ca3c5984a85da9fa5e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -572,7 +572,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -87,7 +87,7 @@ index 60d008840855e051b5faa0dae2bbfcdb40269620..8837a6b19cab18eb47b7723236c7761c
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1385,7 +1419,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1386,7 +1420,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ index 60d008840855e051b5faa0dae2bbfcdb40269620..8837a6b19cab18eb47b7723236c7761c
|
||||
|
||||
d6 = d0 - this.lastGoodX; // Paper - diff on change, used for checking large move vectors above
|
||||
d7 = d1 - this.lastGoodY; // Paper - diff on change, used for checking large move vectors above
|
||||
@@ -1427,6 +1461,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1428,6 +1462,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
this.player.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
|
||||
@ -104,7 +104,7 @@ index 60d008840855e051b5faa0dae2bbfcdb40269620..8837a6b19cab18eb47b7723236c7761c
|
||||
// Paper start - prevent position desync
|
||||
if (this.awaitingPositionFromClient != null) {
|
||||
return; // ... thanks Mojang for letting move calls teleport across dimensions.
|
||||
@@ -1457,7 +1492,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1458,7 +1493,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
// Paper start - Add fail move event
|
||||
@ -123,7 +123,7 @@ index 60d008840855e051b5faa0dae2bbfcdb40269620..8837a6b19cab18eb47b7723236c7761c
|
||||
if (teleportBack) {
|
||||
io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.CLIPPED_INTO_BLOCK,
|
||||
toX, toY, toZ, toYaw, toPitch, false);
|
||||
@@ -1568,7 +1613,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1569,7 +1614,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
private boolean updateAwaitingTeleport() {
|
||||
if (this.awaitingPositionFromClient != null) {
|
||||
@ -132,7 +132,7 @@ index 60d008840855e051b5faa0dae2bbfcdb40269620..8837a6b19cab18eb47b7723236c7761c
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot());
|
||||
}
|
||||
@@ -1581,6 +1626,33 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1582,6 +1627,33 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,10 +10,10 @@ public net.minecraft.world.inventory.AbstractContainerMenu quickcraftType
|
||||
public net.minecraft.world.inventory.AbstractContainerMenu resetQuickCraft()V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8837a6b19cab18eb47b7723236c7761c6661edda..744e07877b8837b789cc117e33bd2a8f2c58ab17 100644
|
||||
index 9a77b6194fb92451a5db5ca3c5984a85da9fa5e2..b13057c0792067cc6b0abdf0d64a9be2cc9389a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3126,6 +3126,25 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -3127,6 +3127,25 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
break;
|
||||
case QUICK_CRAFT:
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren