Skip to content

config block states

Robin Seifert edited this page May 18, 2024 · 5 revisions

Config BlockState

A block state is each unique block and property combination in minecraft. Stone for example may be minecraft:stone but have a unique state of minecraft:stone@0 and minecraft:stone@1 for different types.

Format supported by ICBM for most configs is as followed

Block

Format: domain:resource

Examples: minecraft:stone, forge:fluid, icbmclassic:explosive

This will be just the key used to register a block. The domain will be either minecraft, forge, or a mod's id. With the resource being either a single word or series of words with separators. Some mods will use . or _ to separate words. See each mod's documentation for a list of blocks or use a tool like NEI/JEI to lookup.

The id will not always match the mod's name. Neither will the resource always match the block's name.

Metadata

format: domain:resource@number

Examples: minecraft:stone@0, minecraft:leave0@10, icbmclassic:explosive@5

Quick way to get some block states for Minecraft 1.12. Not supported in newer version as metadata was removed from the base game. Newer versions view each blockState as a unique block. Exceptions to this where render or location specific properties. Such as rotation, on/off, or random.

BlockState

format: domain:resource[property:value, property*:value*]

Examples: minecraft:lever[face:wall,facing:north,powered:false]

Can't be combined with metadata version. As metadata is a quick lookup for properties. Each property is a unique state of the block. Some blocks may only have a single property such as facing. While other blocks may have several depending complexity. Simple looking blocks may actually be far more complex in terms of data. Use tools to detect which properties to use. Not all properties are useful. Such as facing only being used for rotation when placed.

Rule of thumb: if the property isn't related to a unique item. Then it can be ignored to prevent over unique specifiers.

Replacements

format: input=output or input=output,chance/condition

example: minecraft:stone@0=minecraft:cobblestone

Follows the same general options for block/blockState. Only using a = to split the input from the output. Not all configs will support chance or conditionals. See each mechanic or feature documentation to better understand what is supported.

replacements do not chain, so if you have water -> ice and then ice -> stone. The result will only use the first entry found. This is currently to reduce chance of loops and complexity in the code base. Future systems may allow this for advanced functionality. Such as map data systems using properties like heat, radioactive material, or in-world crafting


Dev Docs: https://forge.gemwire.uk/wiki/BlockStates

Wiki: https://minecraft.fandom.com/wiki/Block_states

Clone this wiki locally