From 7a7484ba2f51bb1a30c604c247ec41bb12fabbec Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Mon, 24 Mar 2014 03:38:52 -0500 Subject: [PATCH] Lists not Arrays. --- integration/modules/CraftGuide.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/integration/modules/CraftGuide.java b/integration/modules/CraftGuide.java index 39e3890c..7e837579 100644 --- a/integration/modules/CraftGuide.java +++ b/integration/modules/CraftGuide.java @@ -1,5 +1,6 @@ package appeng.integration.modules; +import java.util.Arrays; import java.util.List; import net.minecraft.init.Blocks; @@ -219,10 +220,10 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul output[i] = items.get( i ); if ( output[i] instanceof ItemStack[] ) - output[i] = ((ItemStack[]) output[i])[0]; + output[i] = Arrays.asList( (ItemStack[]) output[i] ); - if ( output[i] instanceof List ) - output[i] = ((List) output[i]).get( 0 ); + // if ( output[i] instanceof List ) + // output[i] = ((List) output[i]).get( 0 ); } output[9] = recipeOutput; @@ -241,10 +242,10 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul output[i] = items[y * width + x]; if ( output[i] instanceof ItemStack[] ) - output[i] = ((ItemStack[]) output[i])[0]; + output[i] = Arrays.asList( (ItemStack[]) output[i] ); - if ( output[i] instanceof List ) - output[i] = ((List) output[i]).get( 0 ); + // if ( output[i] instanceof List ) + // output[i] = ((List) output[i]).get( 0 ); } } @@ -264,10 +265,10 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul output[i] = items[y * width + x]; if ( output[i] instanceof ItemStack[] ) - output[i] = ((ItemStack[]) output[i])[0]; + output[i] = Arrays.asList( (ItemStack[]) output[i] ); - if ( output[i] instanceof List ) - output[i] = ((List) output[i]).get( 0 ); + // if ( output[i] instanceof List ) + // output[i] = ((List) output[i]).get( 0 ); } }