📄️ Syllables
The main building-blocks of predicate-expressions are the syllables, which may massively shorten the resulting string by allowing to leave out parts of the target identifier, and thereby make the process of inputting desired filters less tedious. Another advantage would be that one only needs to remember parts of said identifiers, and can thereby explore a massive realm of available matches in a playful and stepwise manner.
📄️ Predicate Decision
While it might not be immediately obvious how specific predicate types are decided upon, based on nothing but the aforementioned syllable matching units, the process is rather simple. All existing target identifiers are tested against, which results in a list of matches; the match shortest in length is considered to be the final result. This list of matches is displayed to the user by the means of command completion, while the final result preview is rendered in the action-bar.
📄️ Numeric Arguments
A predicate may support the use of one or more numeric arguments; these are the syntax-features available.
📄️ Material Predicate
The material-predicate matches against the type of item, e.g. stone, dirt, enchanted book, diamond pickaxe, etc., and does not take any arguments.
📄️ Amount Predicate
The amount predicate matches against the stack-size of an item and takes one argument: the target size. While, as with all predicates, this argument is optional, the predicate results in a noop (no operation) when left out, for obvious reasons.
📄️ Deterioration Predicate
The deterioration predicate matches against the remaining durability of an item and takes two arguments: the minimum used-up durability in percent, and the maximum used-up durability in percent. Without any arguments, this predicate results in all items which can experience deterioration, like tools, etc.
📄️ Enchantment Predicate
The enchantment predicate matches against the enchantments contained either on an enchantable item, or an enchanted book and takes a single argument, representing the enchantment level. An item is considered to be a match as soon as it contains the desired enchantment, which does not rule out other concurrent enchantments; if this behavior is not desired, have a look at and then enter exact mode.
📄️ Potion-Effect Predicate
The potion-effect predicate matches against both the base- as well as further custom-effects on various potions, such as standard-, splash- and lingering-potions; it takes two arguments, namely the effect's amplifier (level) as well as it's duration.
📄️ Music-Instrument Predicate
The music-instrument predicate matches against all items which can be used as music instruments and takes no arguments. At the time of writing this, the aforementioned concept has just been introduced and only regards goat-horns.
📄️ Text-Search Predicate
The text-search predicate scans through various text-based properties of an item, including it's displayname, lore-lines, book author, book title, book pages and skull owner name. It takes no arguments and is identified by surrounding double-quotes ("); in order to add double-quotes to the predicate's contents, escape them by a backslash (\).
📄️ Exact Mode
Exact mode is not a predicate by itself, but rather an operator which can be prepended to any other expression. Once entered, all enchantments and potion-effects need to be matched against by the contained predicates; each predicate removes it's match from the respective list, and at the end, the lists have to be empty for the whole exact expression to be considered a match. While, for simple expressions, prepending a single predicate may suffice, complex expressions can be prepended by making use of parentheses, since this operator is evaluated before various logical junctions.
📄️ Or Junction
The or junction results in a match if either it's left- or it's right-hand-side expression evaluates to a match - or both. It is always evaluated last, if not otherwise specified by the use of parentheses.
📄️ And Junction
The and junction results in a match if both it's left- and it's right-hand-side expressions evaluate to a match. It is evaluated before the or and after the negation, if not otherwise specified by the use of parentheses.
📄️ Negation
The negation operator flips the result of it's applied-to expression, and thereby converts matches into mismatches and vice-versa. It is always executed first, right after the exact mode operator, if not otherwise specified by the use of parentheses.
📄️ Parentheses
Parentheses can be used to specify any arbitrary evaluation precedence other than the default by wrapping statements in a beginning opening-parenthesis ( and an ending closing-parenthesis ). While completing commands, parentheses do not need to be balanced, but when dispatching the corresponding command and thereby finally parsing the input, non-balanced parentheses will result in an error-notification, as to prevent unintentional behavior.