PaperMC/paper-server/nms-patches/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.patch
CraftBukkit/Spigot e01dc013f7 Fix regression listening to minecraft:brand custom payloads
By: md_5 <git@md-5.net>
2024-05-08 07:34:19 +10:00

12 lines
963 B
Diff

--- a/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java
+++ b/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java
@@ -16,8 +16,7 @@
private static final int MAX_PAYLOAD_SIZE = 32767;
public static final StreamCodec<PacketDataSerializer, ServerboundCustomPayloadPacket> STREAM_CODEC = CustomPacketPayload.codec((minecraftkey) -> {
return DiscardedPayload.codec(minecraftkey, 32767);
- }, (List) SystemUtils.make(Lists.newArrayList(new CustomPacketPayload.c[]{new CustomPacketPayload.c<>(BrandPayload.TYPE, BrandPayload.STREAM_CODEC)}), (arraylist) -> {
- })).map(ServerboundCustomPayloadPacket::new, ServerboundCustomPayloadPacket::payload);
+ }, java.util.Collections.emptyList()).map(ServerboundCustomPayloadPacket::new, ServerboundCustomPayloadPacket::payload); // CraftBukkit - treat all packets the same
@Override
public PacketType<ServerboundCustomPayloadPacket> type() {