From b9576adaa4b9a872a424f536085dd5988c8f7752 Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Tue, 13 Aug 2024 01:17:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=AD=A6=E5=99=A8=E9=87=8D?= =?UTF-8?q?=E9=93=B8=E5=8F=B0=E7=9A=84=E5=BF=AB=E9=80=9F=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/block/menu/ReforgingTableMenu.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/mcreator/superbwarfare/block/menu/ReforgingTableMenu.java b/src/main/java/net/mcreator/superbwarfare/block/menu/ReforgingTableMenu.java index fd55f5ada..3c7567d5c 100644 --- a/src/main/java/net/mcreator/superbwarfare/block/menu/ReforgingTableMenu.java +++ b/src/main/java/net/mcreator/superbwarfare/block/menu/ReforgingTableMenu.java @@ -77,6 +77,10 @@ public class ReforgingTableMenu extends AbstractContainerMenu { if (!this.moveItemStackTo(stack, RESULT_SLOT, RESULT_SLOT + 36, false)) { return ItemStack.EMPTY; } + } else if (pIndex >= AMMO_PERK_SLOT && pIndex <= DAMAGE_PERK_SLOT) { + if (!this.moveItemStackTo(stack, RESULT_SLOT + 1, RESULT_SLOT + 37, false)) { + return ItemStack.EMPTY; + } } else if (pIndex != INPUT_SLOT) { if (stack.is(ModTags.Items.GUN)) { if (!this.moveItemStackTo(stack, INPUT_SLOT, INPUT_SLOT + 1, false)) { @@ -84,21 +88,21 @@ public class ReforgingTableMenu extends AbstractContainerMenu { } } else if (stack.getItem() instanceof PerkItem perkItem) { Perk.Type type = perkItem.getPerk().type; - if (pIndex == AMMO_PERK_SLOT && type == Perk.Type.AMMO) { + if (type == Perk.Type.AMMO) { if (!this.moveItemStackTo(stack, AMMO_PERK_SLOT, AMMO_PERK_SLOT + 1, false)) { return ItemStack.EMPTY; } - } else if (pIndex == FUNC_PERK_SLOT && type == Perk.Type.FUNCTIONAL) { + } else if (type == Perk.Type.FUNCTIONAL) { if (!this.moveItemStackTo(stack, FUNC_PERK_SLOT, FUNC_PERK_SLOT + 1, false)) { return ItemStack.EMPTY; } - } else if (pIndex == DAMAGE_PERK_SLOT && type == Perk.Type.DAMAGE) { + } else if (type == Perk.Type.DAMAGE) { if (!this.moveItemStackTo(stack, DAMAGE_PERK_SLOT, DAMAGE_PERK_SLOT + 1, false)) { return ItemStack.EMPTY; } } } - } else if (!this.moveItemStackTo(stack, RESULT_SLOT, RESULT_SLOT + 36, false)) { + } else if (!this.moveItemStackTo(stack, RESULT_SLOT + 1, RESULT_SLOT + 37, false)) { return ItemStack.EMPTY; }