Conditions

Conditional elements are a special feature of the CustomOreGen xml parser. In general, the contents of a conditional element are discarded if the condition is false.

There are three types of condition available. See Types for details.

Using Then and Else
The "contents" (child elements and attributes) of a condition should be placed in a  or (optionally) an  element. If the condition is true all contents of the  are transferred to the conditional's parent. If the condition is false then all contents of the  element are transferred instead. As a shortcut, the contents (child elements only) can be placed directly in the conditional element, with no . This cuts down on the amount of code if there is no need for an  block and no child attributes in the content.

Presence of another Mod
The  and  elements test whether or not the specified mod is currently installed. This is obviously useful for adding mod-specific distributions to the config file. Both elements have a single attribute:

Value of a Choice Option
The  and  elements test whether or not a choice option has a specific value. This could also be done with  element as well, but  is simpler and offer case insensitive comparison.

 and  have the following attributes:

Arbitrary Expression
The  element accepts an arbitrary boolean expression: