This is a static snapshot of the site saved for posterity. No future updates will be made here and all interactive features (comments, etc.) are disabled.

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