9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-04 15:41:38 +00:00

fix(bukkit): 无法鼠标中键获取物品的问题

- 在 PacketConsumers 类中修复了物品获取逻辑的错误
This commit is contained in:
jhqwqmc
2025-02-12 07:25:19 +08:00
parent b3eeea6415
commit dcdd833e2f

View File

@@ -397,7 +397,7 @@ public class PacketConsumers {
ItemStack previous = inventory.getItem(targetSlot);
ItemUtils.setItem(inventory, targetSlot, picked.clone());
if (previous != null) {
ItemUtils.setItem(inventory, targetSlot, previous);
ItemUtils.setItem(inventory, matchingSlot, previous);
} else {
picked.setAmount(0);
}