Fixed Double Chest Order not being respected

Conflicts:
	src/main/java/com/enderio/core/common/util/ItemUtil.java
This commit is contained in:
Henry Loenwind committed 2016-03-31 08:00:54 +02:00
1 parent 7e28209e71
commit 7f36749dd6
2 files changed
+9 -2

No files matched your search

+8 -2
View File
@@ -444,19 +444,25 @@ public class ItemUtil {
if (inv instanceof TileEntityChest) {
TileEntityChest chest = (TileEntityChest) inv;
TileEntityChest neighbour = null;
boolean reverse = false;
if (chest.adjacentChestXNeg != null) {
neighbour = chest.adjacentChestXNeg;
reverse = true;
} else if (chest.adjacentChestXPos != null) {
neighbour = chest.adjacentChestXPos;
} else if (chest.adjacentChestZNeg != null) {
neighbour = chest.adjacentChestZNeg;
reverse = true;
} else if (chest.adjacentChestZPos != null) {
neighbour = chest.adjacentChestZPos;
}
if (neighbour != null) {
return new InventoryLargeChest("", inv, neighbour);
if (reverse) {
return new InventoryLargeChest("", neighbour, inv);
} else {
return new InventoryLargeChest("", inv, neighbour);
}
}
return inv;
}
return inv;
}