From 53eef4d9fb1dda70e605a42ef483eed92de72d27 Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Sat, 19 Mar 2022 02:49:25 +0800 Subject: make miner output to correct slots (#985) * make miner output to correct slots * fix git derp --- .../tileentities/machines/basic/GT_MetaTileEntity_Miner.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java index cf3ed75291..65ab904498 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java @@ -286,9 +286,12 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine impl /** Pushes (or check can push) item to output slots. */ @Override public boolean pushOutputs(ItemStack stack, int count, boolean simulate, boolean allowInputSlots) { - int startSlot = allowInputSlots ? getInputSlot() : getOutputSlot(); - int maxSlot = mInventory.length; - for (int i = startSlot; i < maxSlot; i++) { + return allowInputSlots && pushOutput(getInputSlot(), getInputSlot() + mInputSlotCount, stack, count, simulate) || + pushOutput(getOutputSlot(), mOutputItems.length, stack, count, simulate); + } + + private boolean pushOutput(int startIndex, int endIndex, ItemStack stack, int count, boolean simulate) { + for (int i = startIndex; i < endIndex; i++) { ItemStack slot = mInventory[i]; if (slot == null || slot.stackSize == 0) { if (!simulate) { -- cgit