From 7d55e7b0322de25a34a5c0bcc82b852d4391b1b9 Mon Sep 17 00:00:00 2001 From: Gate Guardian Date: Sat, 15 Jun 2024 14:49:31 +0800 Subject: [PATCH] spotless --- .../api/misc/UnlimitedItemStackTransfer.java | 17 ++++++++--------- .../part/appeng/StockingBusPartMachine.java | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/epimorphismmc/gregiceng/api/misc/UnlimitedItemStackTransfer.java b/src/main/java/com/epimorphismmc/gregiceng/api/misc/UnlimitedItemStackTransfer.java index 0ff0fe8..7766a67 100644 --- a/src/main/java/com/epimorphismmc/gregiceng/api/misc/UnlimitedItemStackTransfer.java +++ b/src/main/java/com/epimorphismmc/gregiceng/api/misc/UnlimitedItemStackTransfer.java @@ -2,14 +2,15 @@ import com.lowdragmc.lowdraglib.misc.ItemStackTransfer; import com.lowdragmc.lowdraglib.side.item.ItemTransferHelper; + import net.minecraft.core.NonNullList; import net.minecraft.world.item.ItemStack; + import org.jetbrains.annotations.NotNull; public class UnlimitedItemStackTransfer extends ItemStackTransfer { - public UnlimitedItemStackTransfer() { - } + public UnlimitedItemStackTransfer() {} public UnlimitedItemStackTransfer(int size) { super(size); @@ -24,17 +25,14 @@ public UnlimitedItemStackTransfer(ItemStack stack) { } @Override - @NotNull - public ItemStack extractItem(int slot, int amount, boolean simulate, boolean notifyChanges) { - if (amount == 0) - return ItemStack.EMPTY; + @NotNull public ItemStack extractItem(int slot, int amount, boolean simulate, boolean notifyChanges) { + if (amount == 0) return ItemStack.EMPTY; validateSlotIndex(slot); ItemStack existing = this.stacks.get(slot); - if (existing.isEmpty()) - return ItemStack.EMPTY; + if (existing.isEmpty()) return ItemStack.EMPTY; if (existing.getCount() <= amount) { if (!simulate) { @@ -48,7 +46,8 @@ public ItemStack extractItem(int slot, int amount, boolean simulate, boolean not } } else { if (!simulate) { - this.stacks.set(slot, ItemTransferHelper.copyStackWithSize(existing, existing.getCount() - amount)); + this.stacks.set( + slot, ItemTransferHelper.copyStackWithSize(existing, existing.getCount() - amount)); if (notifyChanges) { onContentsChanged(slot); } diff --git a/src/main/java/com/epimorphismmc/gregiceng/common/machine/multiblock/part/appeng/StockingBusPartMachine.java b/src/main/java/com/epimorphismmc/gregiceng/common/machine/multiblock/part/appeng/StockingBusPartMachine.java index 83bee7a..003391c 100644 --- a/src/main/java/com/epimorphismmc/gregiceng/common/machine/multiblock/part/appeng/StockingBusPartMachine.java +++ b/src/main/java/com/epimorphismmc/gregiceng/common/machine/multiblock/part/appeng/StockingBusPartMachine.java @@ -3,8 +3,8 @@ import com.epimorphismmc.gregiceng.api.machine.feature.multiblock.IMEStockingBus; import com.epimorphismmc.gregiceng.api.misc.ConfigurableAESlot; import com.epimorphismmc.gregiceng.api.misc.IConfigurableAESlotList; - import com.epimorphismmc.gregiceng.api.misc.UnlimitedItemStackTransfer; + import com.epimorphismmc.monomorphism.ae2.MEPartMachine; import com.epimorphismmc.monomorphism.machine.fancyconfigurator.InventoryFancyConfigurator;