diff options
4 files changed, 11 insertions, 43 deletions
diff --git a/build.properties b/build.properties index 9c6f282480..407cf4ff61 100644 --- a/build.properties +++ b/build.properties @@ -1,6 +1,6 @@ minecraft.version=1.7.10 forge.version=10.13.4.1614-1.7.10 -gt.version=5.09.37.06 +gt.version=5.09.37.07 structurelib.version=1.0.6 ae2.version=rv3-beta-22 applecore.version=1.7.10-1.2.1+107.59407 diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java index faea347c67..21cf0d73f1 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java @@ -329,20 +329,18 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM } protected void fillStacksIntoFirstSlots() { - if (bSortStacks) { - for (int i = 0; i < mInventory.length - 1; i++) { - if (!isValidSlot(i)) { + for (int i = 0; i < mInventory.length - 1; i++) { + if (!isValidSlot(i)) { + continue; + } + + for (int j = i + 1; j < mInventory.length; j++) { + if (!isValidSlot(j)) { continue; } - for (int j = i + 1; j < mInventory.length; j++) { - if (!isValidSlot(j)) { - continue; - } - - if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) - GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - } + if (mInventory[j] != null && (mInventory[i] == null || GT_Utility.areStacksEqual(mInventory[i], mInventory[j]))) + GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); } } } diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java index 9da0eace39..774639401a 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java @@ -124,22 +124,7 @@ public class GT_MetaTileEntity_ChestBuffer extends GT_MetaTileEntity_Buffer { @Override protected void fillStacksIntoFirstSlots() { sortStacks(); - // Merge small stacks together - // The last slot of mInventory is invalid, so we need to avoid iterating over it. - // Thus all max indices are reduced by 1 here. - for (int i = 0; i < this.mInventory.length - 2;) { - //GT_FML_LOGGER.info( (this.mInventory[i] == null) ? "Slot empty " + i : "Slot " + i + " holds " + this.mInventory[i].getDisplayName()); - for (int j = i + 1; j < this.mInventory.length - 1; j++) { - if ((this.mInventory[j] != null) && ((GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j])))) { - GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); - //GT_FML_LOGGER.info( "Moving slot " + j + " into slot " + i ); - } - else { - i=j; - break; // No more matching items for this i, do next i - } - } - } + super.fillStacksIntoFirstSlots(); } @Override diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java index 3cf5adff99..a796ce9661 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java @@ -50,21 +50,6 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer } @Override - protected void fillStacksIntoFirstSlots() { - // The last slot of mInventory is invalid, so we need to avoid iterating over it. - // Thus all max indices are reduced by 1 here. - for (int i = 0; i < this.mInventory.length - 2; i++) { - for (int j = i + 1; j < this.mInventory.length - 1; j++) { - if ((this.mInventory[j] != null) - && ((this.mInventory[i] == null) || (GT_Utility.areStacksEqual(this.mInventory[i], this.mInventory[j])))) { - GT_Utility.moveStackFromSlotAToSlotB(getBaseMetaTileEntity(), getBaseMetaTileEntity(), j, i, (byte) 64, (byte) 1, - (byte) 64, (byte) 1); - } - } - } - } - - @Override public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { return new GT_GUIContainer_ItemDistributor(aPlayerInventory, aBaseMetaTileEntity); } |