Skip to content

Composed File Format

zerocool edited this page Jan 16, 2026 · 2 revisions

The format is a custom format, based off of what java's built in Properties uses. The base supported types are strings, numbers, decimals, and arrays of these types. They all contain a key and a value like this:

key=value

Strings

Strings are the key, with its value in quotes. The quotes are not included in the parsed string.

key="string value"

Numbers

Numbers are analogous to any of the whole number types (byte, short, int, long, and their class types). They will be capped at the limit of the underlying type.

key=123456

Decimals

Decimals are like java float and double. They are limited by the type used in the class.

key=789.123

Arrays

Arrays hold an unnamed array of one type of property. They can be empty and that will result in an empty array in java. They are held in the code as an ArrayList. They look like this in the file.

key=[
value1
value2
...
]

They require a square bracket after the equals sign, then a new line right after. Each value is separated by new lines and not commas. So every value must be on a separate line

Registry types

Types like Item, Block and StatusEffect from Minecraft are stored as strings in the file. When read the ConfigFile class performs a lookup on the string as the Identifier. The opposite happens when writing, it looks up the id of the value held in the field it is writing, then writes that. Ex:

key="minecraft:stick"

Clone this wiki locally