Fixes Index OOB error

This commit is contained in:
CovertJaguar 2012-10-28 11:50:49 -07:00
parent f1f4f1bdde
commit fbd0fa7cda

View file

@ -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