From b0f627d7bb3af9d579d3d6787191a7aa21cca75c Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sat, 14 Dec 2024 21:42:25 +0100 Subject: [PATCH] Small cleanup --- .../common/ServerboundCustomPayloadPacket.java.patch | 10 ++++------ .../net/minecraft/world/entity/LivingEntity.java.patch | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch index b7477f930e..10835a1af3 100644 --- a/paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch +++ b/paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch @@ -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 STREAM_CODEC = CustomPacketPayload.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 type() { diff --git a/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch index 713fc86621..19054bee9f 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch @@ -137,14 +137,14 @@ + } + + @Override -+ public void remove(Entity.RemovalReason reason, EntityRemoveEvent.Cause eventCaue) { ++ public void remove(Entity.RemovalReason reason, EntityRemoveEvent.Cause eventCause) { + // CraftBukkit end if ((reason == Entity.RemovalReason.KILLED || reason == Entity.RemovalReason.DISCARDED) && this.level() instanceof ServerLevel serverLevel) { this.triggerOnDeathMobEffects(serverLevel, reason); } - super.remove(reason); -+ super.remove(reason, eventCaue); // CraftBukkit ++ super.remove(reason, eventCause); // CraftBukkit this.brain.clearMemories(); }