Small diff cleanups from patch updating

And remove a dumb log change in PacketEncoder
This commit is contained in:
Nassim Jahnke
2024-12-17 16:50:59 +01:00
parent 183782ad2e
commit 7caf863b52
25 changed files with 27 additions and 110 deletions

View File

@@ -71,12 +71,12 @@
(entryBuilder, buffer) -> entryBuilder.chatSession = buffer.readNullable(RemoteChatSession.Data::read),
- (buffer, entry) -> buffer.writeNullable(entry.chatSession, RemoteChatSession.Data::write)
+ // Paper start - Prevent causing expired keys from impacting new joins
+ (buf, entry) -> {
+ (buffer, entry) -> {
+ RemoteChatSession.Data chatSession = entry.chatSession;
+ if (chatSession != null && chatSession.profilePublicKey().hasExpired()) {
+ chatSession = null;
+ }
+ buf.writeNullable(chatSession, RemoteChatSession.Data::write);
+ buffer.writeNullable(chatSession, RemoteChatSession.Data::write);
+ }
+ // Paper end - Prevent causing expired keys from impacting new joins
),

View File

@@ -1,10 +1,5 @@
--- a/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
+++ b/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java
@@ -1,3 +_,4 @@
+// mc-dev import
package net.minecraft.network.protocol.game;
import net.minecraft.network.RegistryFriendlyByteBuf;
@@ -16,6 +_,16 @@
ClientboundSystemChatPacket::overlay,
ClientboundSystemChatPacket::new

View File

@@ -1,10 +1,5 @@
--- a/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java
+++ b/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java
@@ -1,3 +_,4 @@
+// mc-dev import
package net.minecraft.network.protocol.game;
import net.minecraft.network.FriendlyByteBuf;
@@ -14,6 +_,7 @@
private final BlockHitResult blockHit;
private final InteractionHand hand;

View File

@@ -1,10 +1,5 @@
--- a/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java
+++ b/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java
@@ -1,3 +_,4 @@
+// mc-dev import
package net.minecraft.network.protocol.game;
import net.minecraft.network.FriendlyByteBuf;
@@ -14,6 +_,7 @@
private final int sequence;
private final float yRot;

View File

@@ -1,10 +1,5 @@
--- a/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
+++ b/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
@@ -1,3 +_,4 @@
+// mc-dev import
package net.minecraft.network.protocol.handshake;
import net.minecraft.network.FriendlyByteBuf;
@@ -20,7 +_,7 @@
}