Cold Sweat has a special type of config that allows for the modification of certain other configs. For example, a registry modifier can be used to change the attributes of an insulation item, or to disable a config entirely. Registry modifiers can target TOML, JSON, and KubeJS registries.
The structure of configs when loaded in memory might be different from how they're written in the source file. A collection of all configs as they are in memory can be obtained by running /coldsweat dumpconfigs, which creates a directory in the config folder containing all currently loaded configs.
Note: Registry modifiers do not actually modify the target configuration's source. They only modify the data in memory as it is loaded.
Format
{// The type of config to target// The registry name of each config type is given on its respective docs page"registry":"cold_sweat:entity/entity_temp",// Config formats to check ("toml", "json", "kubejs")// Can also be a single element ("config_type": "json")"config_type":["json"],// List of IDs to check. These IDs are registered by MC when datapacks are parsed// Only JSON registries have IDs, so this does not work for TOML or KubeJS configs"entries":["cold_sweat:on_fire"],// Any configs matching the given data structure(s) are modified// Optional if "entries" is defined// These are NBT requirements, so Cold Sweat's special NBT functions also work here"matches":[{"entity":{"flags":{"is_baby":false}}},{// ..more checks}],// A list of operations to perform on the target's data// Explained in the section below"operations":[]}
Operations
Each registry modifier can perform one or many operations on the target config. There are five operation types, each affecting the target data in a different way:
disable
Disables the target entirely, causing it to not load.
replace
Replaces the top-level key of the target, if it exists. The contents of the new data completely replace the old data, which is removed.
merge
Merges the given data with that of the target. If two keys are identical, the new data overwrites the existing data.
If a list of elements is given, the new list will be combined with the old list.
The merge operation also supports performing basic arithmetic on the original value to produce a new value. The following operators are implemented:
+= Addition
-= Subtraction
*= Multiplication
/= Division
^= Exponent
%= Modulus
append
Adds the given data to the target, without overwriting or modifying existing data at all. In the case of duplicate keys, the existing data is kept. This operation is "deep", meaning nested data is also appended. This operation does not affect lists.
remove
Removes data from the target. Also supports removing elements from a list.