From fbd0fa7cda09afa4af187067a99fa2eb5a65e5d8 Mon Sep 17 00:00:00 2001 From: CovertJaguar Date: Sun, 28 Oct 2012 11:50:49 -0700 Subject: [PATCH] Fixes Index OOB error --- .../silicon/TileAssemblyAdvancedWorkbench.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java b/common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java index 07e359bf..bafcf945 100644 --- a/common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java +++ b/common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java @@ -45,13 +45,15 @@ public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInvent @Override public ItemStack getStackInSlot(int par1) { - if (tempStacks!=null && par1>=0) { - return tempStacks[bindings[par1]]; - } else if (tempStacks!=null && par1<0) { + if(tempStacks != null) { + if(par1 >= 0 && par1 < 9) { + if(bindings[par1] >= 0) { + return tempStacks[bindings[par1]]; + } + } return null; - } else { - return craftingSlots.getStackInSlot(par1); } + return craftingSlots.getStackInSlot(par1); } @Override