Small diff cleanups from patch updating
And remove a dumb log change in PacketEncoder
This commit is contained in:
@@ -14,15 +14,7 @@
|
||||
this.protocolInfo.codec().encode(byteBuf, packet);
|
||||
int i = byteBuf.readableBytes();
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
@@ -32,14 +_,40 @@
|
||||
|
||||
JvmProfiler.INSTANCE.onPacketSent(this.protocolInfo.id(), packetType, channelHandlerContext.channel().remoteAddress(), i);
|
||||
} catch (Throwable var9) {
|
||||
- LOGGER.error("Error sending packet {}", packetType, var9);
|
||||
+ LOGGER.error("Error sending packet {} (skippable? {})", packetType, packet.isSkippable(), var9);
|
||||
if (packet.isSkippable()) {
|
||||
throw new SkipPacketException(var9);
|
||||
}
|
||||
@@ -39,7 +_,33 @@
|
||||
|
||||
throw var9;
|
||||
} finally {
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
- ChatDecorator PLAIN = (player, message) -> message;
|
||||
-
|
||||
- Component decorate(@Nullable ServerPlayer player, Component message);
|
||||
+ ChatDecorator PLAIN = (sender, message) -> java.util.concurrent.CompletableFuture.completedFuture(message); // Paper - adventure; support async chat decoration events
|
||||
+ ChatDecorator PLAIN = (player, message) -> java.util.concurrent.CompletableFuture.completedFuture(message); // Paper - adventure; support async chat decoration events
|
||||
+
|
||||
+ @io.papermc.paper.annotation.DoNotUse @Deprecated // Paper - adventure; support chat decoration events (callers should use the overload with CommandSourceStack)
|
||||
+ java.util.concurrent.CompletableFuture<Component> decorate(@Nullable ServerPlayer sender, Component message); // Paper - adventure; support async chat decoration events
|
||||
+ java.util.concurrent.CompletableFuture<Component> decorate(@Nullable ServerPlayer player, Component message); // Paper - adventure; support async chat decoration events
|
||||
+
|
||||
+ // Paper start - adventure; support async chat decoration events
|
||||
+ default java.util.concurrent.CompletableFuture<Component> decorate(@Nullable ServerPlayer sender, @Nullable net.minecraft.commands.CommandSourceStack commandSourceStack, Component message) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ default java.util.stream.Stream<Component> stream() {
|
||||
+ return com.google.common.collect.Streams.concat(new java.util.stream.Stream[]{java.util.stream.Stream.of(this), this.getSiblings().stream().flatMap(Component::stream)});
|
||||
+ return com.google.common.collect.Streams.concat(java.util.stream.Stream.of(this), this.getSiblings().stream().flatMap(Component::stream));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
||||
@@ -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
|
||||
),
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 @@
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user