From 21c3464575eb2247b4c7899b536cb06c12ff11e1 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Wed, 22 Oct 2014 17:36:48 +0200 Subject: [PATCH 1/2] Fix CraftingStation exposing old nonexistant slots through ISided --- src/main/java/tconstruct/tools/logic/CraftingStationLogic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tconstruct/tools/logic/CraftingStationLogic.java b/src/main/java/tconstruct/tools/logic/CraftingStationLogic.java index 20180c42..6da5d6c7 100644 --- a/src/main/java/tconstruct/tools/logic/CraftingStationLogic.java +++ b/src/main/java/tconstruct/tools/logic/CraftingStationLogic.java @@ -90,7 +90,7 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent @Override public int[] getAccessibleSlotsFromSide (int var1) { - return new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + return new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; } @Override From b3632e66bbd2aa6abd7939166fde3f09eddbf432 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Wed, 22 Oct 2014 17:37:27 +0200 Subject: [PATCH 2/2] Fix InventoryCraftingStation accessing incorrect slots, that can sometimes lead to invalid accesses/crahes with some crafting stuff now. --- .../tconstruct/tools/inventory/InventoryCraftingStation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/tconstruct/tools/inventory/InventoryCraftingStation.java b/src/main/java/tconstruct/tools/inventory/InventoryCraftingStation.java index f301336d..fe19d842 100644 --- a/src/main/java/tconstruct/tools/inventory/InventoryCraftingStation.java +++ b/src/main/java/tconstruct/tools/inventory/InventoryCraftingStation.java @@ -37,7 +37,8 @@ public class InventoryCraftingStation extends InventoryCrafting @Override public ItemStack getStackInSlot (int slot) { - return slot >= this.getSizeInventory() + 1 ? null : logic.getStackInSlot(slot + 1); + // the 9 slots + 1 output slot that's not accessible, we therefore have to add 1 to the slot accessed + return slot > this.getSizeInventory() ? null : logic.getStackInSlot(slot+1); } @Override