aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-01-31 03:49:33 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-01-31 03:49:33 +0000
commitc0daba1659c667342da1529c31896a98768a8eda (patch)
treee1e1f25c265c63fb2dbbb5c113e941a92e9cfa4c /src/Java/gtPlusPlus/core/util
parent241df1134f16c6c9c54b198db97279d697de8c77 (diff)
downloadGT5-Unofficial-c0daba1659c667342da1529c31896a98768a8eda.tar.gz
GT5-Unofficial-c0daba1659c667342da1529c31896a98768a8eda.tar.bz2
GT5-Unofficial-c0daba1659c667342da1529c31896a98768a8eda.zip
+ 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.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java17
1 files changed, 14 insertions, 3 deletions
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;
}