If Statement

 

Used for conditional definition of recipes or configuration statements. There are 2 forms:

  • Configuration – this can be used in Configuration Blocks and may contain only Configuration Statements:
    if {condition} <<
        {statements}
    >> [ else <<
        {statements}
    >> ]
if HaveMod foo {
    // will be executed only if mod foo is present
}

if HaveOD ingotCopper {
    // will be executed only if copper ingots are in OD
} else {
    // will be executed otherwise
}
if HaveMod foo <<
    // will be executed only if mod foo is present
>>

 

 

 Posted by at 10:04 am