Lists not Arrays.

This commit is contained in:
AlgorithmX2 2014-03-24 03:38:52 -05:00
parent 7dedf8b272
commit 7a7484ba2f

View file

@ -1,5 +1,6 @@
package appeng.integration.modules; package appeng.integration.modules;
import java.util.Arrays;
import java.util.List; import java.util.List;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
@ -219,10 +220,10 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
output[i] = items.get( i ); output[i] = items.get( i );
if ( output[i] instanceof ItemStack[] ) if ( output[i] instanceof ItemStack[] )
output[i] = ((ItemStack[]) output[i])[0]; output[i] = Arrays.asList( (ItemStack[]) output[i] );
if ( output[i] instanceof List ) // if ( output[i] instanceof List )
output[i] = ((List) output[i]).get( 0 ); // output[i] = ((List) output[i]).get( 0 );
} }
output[9] = recipeOutput; output[9] = recipeOutput;
@ -241,10 +242,10 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
output[i] = items[y * width + x]; output[i] = items[y * width + x];
if ( output[i] instanceof ItemStack[] ) if ( output[i] instanceof ItemStack[] )
output[i] = ((ItemStack[]) output[i])[0]; output[i] = Arrays.asList( (ItemStack[]) output[i] );
if ( output[i] instanceof List ) // if ( output[i] instanceof List )
output[i] = ((List) output[i]).get( 0 ); // output[i] = ((List) output[i]).get( 0 );
} }
} }
@ -264,10 +265,10 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
output[i] = items[y * width + x]; output[i] = items[y * width + x];
if ( output[i] instanceof ItemStack[] ) if ( output[i] instanceof ItemStack[] )
output[i] = ((ItemStack[]) output[i])[0]; output[i] = Arrays.asList( (ItemStack[]) output[i] );
if ( output[i] instanceof List ) // if ( output[i] instanceof List )
output[i] = ((List) output[i]).get( 0 ); // output[i] = ((List) output[i]).get( 0 );
} }
} }