diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..be1c43db --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'EnderCore' \ No newline at end of file diff --git a/src/main/java/com/enderio/core/common/util/ItemUtil.java b/src/main/java/com/enderio/core/common/util/ItemUtil.java index 45db8b0a..49b9d179 100644 --- a/src/main/java/com/enderio/core/common/util/ItemUtil.java +++ b/src/main/java/com/enderio/core/common/util/ItemUtil.java @@ -450,19 +450,25 @@ public static IInventory getInventory(IInventory inv) { 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("", (ILockableContainer)inv, (ILockableContainer)neighbour); + if (reverse) { + return new InventoryLargeChest("", (ILockableContainer) neighbour, (ILockableContainer) inv); + } else { + return new InventoryLargeChest("", (ILockableContainer) inv, (ILockableContainer) neighbour); + } } - return inv; } return inv; }