This commit is contained in:
@@ -13147,16 +13147,9 @@ public class AreaProtection implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.getInventory().setContents(all);
|
p.getInventory().setContents(all);
|
||||||
|
// ★ 第121批续13:副手(slot 40)已被 getContents() 45 格覆盖(0-35背包+36-39盔甲+40副手),
|
||||||
ItemStack off = p.getInventory().getItemInOffHand();
|
// 旧代码在 setContents 后额外扫 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
totalRemoved += count;
|
totalRemoved += count;
|
||||||
|
|||||||
Reference in New Issue
Block a user