From c0daba1659c667342da1529c31896a98768a8eda Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 31 Jan 2019 03:49:33 +0000 Subject: + Added a config option for control cores. Someone should definitely test this works as expected. % Reduced cost of Hatch_Control_Core recipe. % Minor tweaks to Fish Traps. $ Fixed inventory shuffling for some Tile Entities. $ Fixed Super Jukebox, it's now mostly functional. $ Fixed constructBaseMetaTileEntity returning the wrong type of Entity for pre-existing wooden pipes, this should now get caught and thrown if the GT++ entity fails to a ClassCastException. --- src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/Java/gtPlusPlus/core/util') diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java index 486cda42f9..a5cf9527a9 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java @@ -936,11 +936,22 @@ public class ItemUtils { for (int o = 0; o < aInputInventory.getSizeInventory(); o++) { p[o] = aInputInventory.getStackInSlot(o); } - ItemStack[] g = organiseInventory(p); - IInventory aTemp = aInputInventory; + //ItemStack[] g = organiseInventory(p); + + IInventory aTemp = aInputInventory; + for (int i = 0; i < p.length; ++i) { + for (int j = i + 1; j < p.length; ++j) { + if (p[j] != null && (p[i] == null + || GT_Utility.areStacksEqual(p[i], p[j]))) { + GT_Utility.moveStackFromSlotAToSlotB(aTemp, aTemp, j, i, (byte) 64, (byte) 1, (byte) 64, (byte) 1); + } + } + } + + /* for (int o = 0; o < aInputInventory.getSizeInventory(); o++) { aTemp.setInventorySlotContents(o, g[o]); - } + }*/ return aTemp; } -- cgit