Small cleanup

This commit is contained in:
Nassim Jahnke
2024-12-14 21:42:25 +01:00
parent a546b39e58
commit b0f627d7bb
2 changed files with 6 additions and 8 deletions

View File

@@ -1,13 +1,11 @@
--- a/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java
+++ b/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java
@@ -14,9 +_,7 @@
@@ -14,7 +_,7 @@
private static final int MAX_PAYLOAD_SIZE = 32767;
public static final StreamCodec<FriendlyByteBuf, ServerboundCustomPayloadPacket> STREAM_CODEC = CustomPacketPayload.<FriendlyByteBuf>codec(
id -> DiscardedPayload.codec(id, 32767),
- Util.make(Lists.newArrayList(new CustomPacketPayload.TypeAndCodec<>(BrandPayload.TYPE, BrandPayload.STREAM_CODEC)), list -> {})
- )
- .map(ServerboundCustomPayloadPacket::new, ServerboundCustomPayloadPacket::payload);
+ java.util.Collections.emptyList()).map(ServerboundCustomPayloadPacket::new, ServerboundCustomPayloadPacket::payload); // CraftBukkit - treat all packets the same
+ java.util.Collections.emptyList() // CraftBukkit - treat all packets the same
)
.map(ServerboundCustomPayloadPacket::new, ServerboundCustomPayloadPacket::payload);
@Override
public PacketType<ServerboundCustomPayloadPacket> type() {