Conditions

 

Conditions are boolean expressions that are used in If statements.

Supported conditions:

  • HaveMod {id or version} – Checks that a mod is present
    • Can specify a simple mod id (in quotes if not alphanumeric)
    • Can also include a version range, in forge format (“modid@range”) , ranges follow maven rules
  • HaveAPI {apiid} – Checks that an API is present
  • HaveOD {name} – Checks that the OreDictionary has an entry with at least one block matching the name

Boolean operators:

  • ! {condition} – Inverts the result
  • ( {condition1} && {condition2} ) – AND, true if both conditions are true
  • ( {condition1} || {condition2} ) – OR, true if either or both conditions are true
Note: Parentheses are required for binary operators

 Posted by at 9:15 am