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
HaveMod FooMod // checks for mod being loaded HaveMod "Foo.Mod" // quotes are needed in id is not alphanumeric HaveMod "FooMod@[3.0.0.0,)" // only versions >= 3.0.0.0 HaveOD ingotCopper // checks copper ingot is registered in OD ( HaveMod Foo && ! HaveMod Bar) // mod Foo is present and mod Bar is not