> **⚠ Variants-CIT v5 replaces v3 and v4 for their respective versions of minecraft. It includes potentially breaking changes to existing packs.**
>
> The codebase received sweeping changes, so there may be unintended breaking changes. If you find any that is [**not listed here**](https://github.com/Estecka/mc-Variants-CIT/wiki/Deprecated_Features#variants-cit-v5), please report it.
>
> The syntax for the new precondition system may receive adjustments in upcoming versions.
### Additions:
- **Added the `precondition` field to all modules. Like `items`, it imposes arbitrary requirements that the item must fulfill before the module can even attempt to apply.** Preconditions use a system similar to `component_data` and `component_format`. [**See Wiki.**](https://github.com/Estecka/mc-Variants-CIT/wiki/Precondition%20Cheat-Sheet)
- **Added module type: `predicates`, which lets you manually attribute individual variant IDs based on preconditions.** This is the most Optifine-like module so far. [**See Wiki.**](https://github.com/Estecka/mc-Variants-CIT/wiki/Module-Types#module-predicates)
- Added module type: `group`, which combines other modules into a single one. Acts as syntaxic sugar and as an optimization, for when the same item needs multiple modules with different priorities.
- Some transforms are now able to handle data types other than strings.
- Added transforms: `equals`, `smaller_than`, `smaller_or_equals`, `greater_than`, `greater_or_equals`, intended to be used in preconditions.
- Added transform equivalents of the `expect` field: `get_string`, `get_number`, `get_identifier`, `get_rich_text`, `get_rich_text_array`
### Behaviour Changes:
- Module option `context` is being renamed to `hook`. The old name will remain functional for the foreseeable future, but is now deprecated.
- `expect` now defaults to accepting every data type. Data that can be converted to strings will automatically do so when required. **In general, `expect` will no longer be required, and should be considered deprecated** in favor of its transform counterparts.
- `sanitize` was changed to behave the same as `sanitize_auto`. Added `sanitize_legacy` for the old behaviour. The name `sanitize_auto` is now deprecated.
- Module `custom_name`'s flavour of sanitization was changed from `_legacy` to `_auto`.
- Added a `multiline_handling` option for regex transforms. Changed the default behaviour to make working with lore components more intuitive. __**THIS WILL LIKELY BREAK ALL EXISTING LORE-BASED MODULES. Set this option to `regex_default` to restore the old behaviour.**__
### Removals:
- Removed the Java API.
- Removed `expect` values: `auto` and `primitive`.
- Removed module types: `custom_data`, `entity_data`, `bucket_entity_data` and `block_entity_data`.
**Use `component_data` instead**
- Removed the old parameters `nbtKey` and `caseSensitive` from `component_data`.
- Removed the old syntax of the `nbtPath` parameter.
- Removed module field `itemsFromModel`. Its behaviour is now tied to whether `modelParent` is set.
- Removed the various `debug` parameters from all the modules. Use the `walkthrough` commands instead.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }