-
Notifications
You must be signed in to change notification settings - Fork 47
JSON vs Properties
Colormatic resources can either be defined in JSON files or in properties files. JSON is the same syntax that is used for vanilla block models (but with different contents), and is the preferred format for modern versions of Minecraft. Colormatic also supports properties files in the minecraft:optifine
namespace for backwards compatibility and because of the format's familiarity with resource pack artists.
Note: Properties files are only read from the minecraft:optifine
namespace, not from the colormatic
namespace.
Properties files and JSON files can both define the same content and are equivalent to Colormatic. In fact, Optifine properties files are converted to JSON under the hood before Colormatic parses them. For example, this biome colormap file
{
"format": "grid",
"blocks": [ "grass", "grass_block", "fern", "tall_grass", "large_fern" ]
}
is equivalent to this properties file.
format=grid
blocks=grass grass_block fern tall_grass large_fern
and this global color file
{
"collar": {
"yellow": "ff00ff",
"light_gray": "00ff00"
}
}
is equivalent to this properties file.
collar.yellow=ff00ff
collar.silver=00ff00
Old names for colors and dimensions are automatically converted to their current names.
JSON objects {}
inside of lists []
cannot be defined neatly in the properties format, so features in Colormatic that use this construct cannot be written in properties files. For example, there is no way to write Colormatic grid
attributes in properties files.