mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 14:12:20 -07:00
Prevent sending oversized item data in equipment and metadata
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
@@ -154,9 +154,12 @@
|
||||
if (!collection.isEmpty()) {
|
||||
sender.accept(new ClientboundUpdateAttributesPacket(this.entity.getId(), collection));
|
||||
}
|
||||
@@ -344,6 +390,7 @@
|
||||
@@ -342,8 +388,9 @@
|
||||
}
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
sender.accept(new ClientboundSetEquipmentPacket(this.entity.getId(), list));
|
||||
- sender.accept(new ClientboundSetEquipmentPacket(this.entity.getId(), list));
|
||||
+ sender.accept(new ClientboundSetEquipmentPacket(this.entity.getId(), list, true)); // Paper - data sanitization
|
||||
}
|
||||
+ ((LivingEntity) this.entity).detectEquipmentUpdatesPublic(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
|
||||
}
|
||||
|
Reference in New Issue
Block a user