mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 22:40:21 +01:00
Small cleanup
This commit is contained in:
parent
a546b39e58
commit
b0f627d7bb
2 changed files with 6 additions and 8 deletions
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue