Fixed MA Crash with processing Patterns.

This commit is contained in:
AlgorithmX2
2014-07-12 17:14:28 -05:00
parent 0045287112
commit 8f65aad67b
2 changed files with 9 additions and 6 deletions
+8 -5
View File
@@ -85,7 +85,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
for (int x = 0; x < inv.getSizeInventory(); x++) for (int x = 0; x < inv.getSizeInventory(); x++)
isEmpty = inv.getStackInSlot( x ) == null && isEmpty; isEmpty = inv.getStackInSlot( x ) == null && isEmpty;
if ( isEmpty ) if ( isEmpty && patternDetails.isCraftable() )
{ {
forcePlan = true; forcePlan = true;
myPlan = patternDetails; myPlan = patternDetails;
@@ -119,9 +119,12 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem(); ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
ICraftingPatternDetails ph = iep.getPatternForItem( is, w ); ICraftingPatternDetails ph = iep.getPatternForItem( is, w );
progress = 0; if ( ph.isCraftable() )
myPattern = is; {
myPlan = ph; progress = 0;
myPattern = is;
myPlan = ph;
}
} }
} }
else else
@@ -223,7 +226,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
World w = getWorldObj(); World w = getWorldObj();
ItemEncodedPattern iep = (ItemEncodedPattern) myPat.getItem(); ItemEncodedPattern iep = (ItemEncodedPattern) myPat.getItem();
ICraftingPatternDetails ph = iep.getPatternForItem( myPat, w ); ICraftingPatternDetails ph = iep.getPatternForItem( myPat, w );
if ( ph != null ) if ( ph != null && ph.isCraftable() )
{ {
forcePlan = true; forcePlan = true;
myPlan = ph; myPlan = ph;
+1 -1
View File
@@ -113,7 +113,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
{ {
if ( ia instanceof AEItemStack ) if ( ia instanceof AEItemStack )
{ {
return ((AEItemStack) ia).def.equals( def ) && def.tagCompound == ((AEItemStack) ia).def.tagCompound; return ((AEItemStack) ia).def.equals( def );// && def.tagCompound == ((AEItemStack) ia).def.tagCompound;
} }
else if ( ia instanceof ItemStack ) else if ( ia instanceof ItemStack )
{ {