fix autocrafting with container items
This commit is contained in:
@@ -196,12 +196,10 @@ public class CraftingTreeProcess
|
|||||||
job.getUsedWhileBuilding().addStorage( part );
|
job.getUsedWhileBuilding().addStorage( part );
|
||||||
this.nodes.put( new CraftingTreeNode( cc, job, part, this, x, depth + 1 ), requestAmount );
|
this.nodes.put( new CraftingTreeNode( cc, job, part, this, x, depth + 1 ), requestAmount );
|
||||||
}
|
}
|
||||||
if( wantedSize == 0 )
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if( wantedSize > 0 )
|
||||||
|
{
|
||||||
if( details.canSubstitute() && cc.getCraftingFor( part, details, x, world ).isEmpty() )
|
if( details.canSubstitute() && cc.getCraftingFor( part, details, x, world ).isEmpty() )
|
||||||
{
|
{
|
||||||
for( IAEItemStack subs : details.getSubstituteInputs( x ) )
|
for( IAEItemStack subs : details.getSubstituteInputs( x ) )
|
||||||
@@ -239,18 +237,16 @@ public class CraftingTreeProcess
|
|||||||
if( sp.getPriority() > prioritizedPattern.getPriority() )
|
if( sp.getPriority() > prioritizedPattern.getPriority() )
|
||||||
{
|
{
|
||||||
prioritizedPattern = sp;
|
prioritizedPattern = sp;
|
||||||
prioritizedIAE = subs;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if( prioritizedIAE != null )
|
||||||
|
{
|
||||||
this.nodes.put( new CraftingTreeNode( cc, job, prioritizedIAE.copy(), this, x, depth + 1 ), wantedSize );
|
this.nodes.put( new CraftingTreeNode( cc, job, prioritizedIAE.copy(), this, x, depth + 1 ), wantedSize );
|
||||||
wantedSize = 0;
|
wantedSize = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( wantedSize == 0 )
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( wantedSize > 0 )
|
if( wantedSize > 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user