From 2ff99fee744fbafbfc9d3f135c139b87adad4cef Mon Sep 17 00:00:00 2001 From: youpaishidifu <1@ypshidifu.cn> Date: Thu, 12 Nov 2026 22:12:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC121=E6=89=B9=E7=BB=AD13=EF=BC=9A?= =?UTF-8?q?=E8=BF=9D=E7=A6=81=E5=93=81=E6=B2=A1=E6=94=B6=E5=89=AF=E6=89=8B?= =?UTF-8?q?=E5=8F=8C=E8=AE=A1=E6=95=B0=E4=BF=AE=E5=A4=8D=EF=BC=88getConten?= =?UTF-8?q?ts=E5=B7=B2=E5=90=ABslot40=EF=BC=8C=E5=88=A0=E5=89=AF=E6=89=8B?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E5=9D=97=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/Sdf1_login/AreaProtection.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/Sdf1_login/AreaProtection.java b/src/main/java/Sdf1_login/AreaProtection.java index d27ef50..ce7cb36 100644 --- a/src/main/java/Sdf1_login/AreaProtection.java +++ b/src/main/java/Sdf1_login/AreaProtection.java @@ -13147,16 +13147,9 @@ public class AreaProtection implements Listener { } } p.getInventory().setContents(all); - - ItemStack off = p.getInventory().getItemInOffHand(); - if (off != null && off.getType() == mat) { - count += off.getAmount(); - ItemStack capOff = off.clone(); - final long batchTagOff = confBatch; - capOff.editPersistentDataContainer(view -> view.set(CONFISCATE_BATCH_KEY, PersistentDataType.LONG, Long.valueOf(batchTagOff))); - captured.add(capOff); - p.getInventory().setItemInOffHand(null); - } + // ★ 第121批续13:副手(slot 40)已被 getContents() 45 格覆盖(0-35背包+36-39盔甲+40副手), + // 旧代码在 setContents 后额外扫 getItemInOffHand() → 副手物品被捕获两次 → 数量翻倍 + 双暂存。 + // 删除副手独立块,副手物品只计一次。 if (count > 0) { totalRemoved += count;