22 lines
1.2 KiB
Diff
22 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Tom <cryptite@gmail.com>
|
|
Date: Thu, 23 Sep 2021 08:56:42 -0500
|
|
Subject: [PATCH] Don't send equipment updates if only durability changed
|
|
|
|
Original code by Cryptite, licensed under MIT
|
|
You can find the original code on https://github.com/Cryptite/Slice
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index 8e5c8d1e59af15a0b28a8e28e60e50d2ec3b23f9..1fdc19830bf4cf677df60c5760e02ae53abc85cc 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -3052,7 +3052,7 @@ public abstract class LivingEntity extends Entity {
|
|
|
|
ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
|
|
|
|
- if (!ItemStack.matches(itemstack1, itemstack)) {
|
|
+ if (!ItemStack.isSameIgnoreDurability(itemstack1, itemstack)) {
|
|
// Paper start - PlayerArmorChangeEvent
|
|
if (this instanceof ServerPlayer && enumitemslot.getType() == EquipmentSlot.Type.ARMOR) {
|
|
final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack);
|