From a90d13e848293cf664774168f14772c4a63ced00 Mon Sep 17 00:00:00 2001 From: kekzdealer Date: Thu, 7 May 2020 20:19:46 +0200 Subject: code formatting --- .../container/Container_ModularNuclearReactor.java | 37 ++++++++-------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'src/main') diff --git a/src/main/java/common/container/Container_ModularNuclearReactor.java b/src/main/java/common/container/Container_ModularNuclearReactor.java index 2b19cc4052..f5430351e5 100644 --- a/src/main/java/common/container/Container_ModularNuclearReactor.java +++ b/src/main/java/common/container/Container_ModularNuclearReactor.java @@ -43,36 +43,27 @@ public class Container_ModularNuclearReactor extends Container { nextSlotID++; return nextSlotID - 1; } - + @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slotRaw) - { + public ItemStack transferStackInSlot(EntityPlayer player, int slotRaw) { ItemStack stack = null; - Slot slot = (Slot)inventorySlots.get(slotRaw); - - if (slot != null && slot.getHasStack()) - { - ItemStack stackInSlot = slot.getStack(); + final Slot slot = (Slot) inventorySlots.get(slotRaw); + + if (slot != null && slot.getHasStack()) { + final ItemStack stackInSlot = slot.getStack(); stack = stackInSlot.copy(); - - if (slotRaw < 3 * 9) - { - if (!mergeItemStack(stackInSlot, 3 * 9, inventorySlots.size(), true)) - { + + if (slotRaw < 3 * 9) { + if (!mergeItemStack(stackInSlot, 3 * 9, inventorySlots.size(), true)) { return null; } - } - else if (!mergeItemStack(stackInSlot, 0, 3 * 9, false)) - { + } else if (!mergeItemStack(stackInSlot, 0, 3 * 9, false)) { return null; } - - if (stackInSlot.stackSize == 0) - { - slot.putStack((ItemStack)null); - } - else - { + + if (stackInSlot.stackSize == 0) { + slot.putStack(null); + } else { slot.onSlotChanged(); } } -- cgit