-
Notifications
You must be signed in to change notification settings - Fork 149
Worldgen Block Filter
Archengius edited this page May 9, 2018
·
1 revision
Block State Filter is thing that is used for advanced matching in block state fillers, but it's primary usage in listing blocks in which worldgen definitions can generate, i.e define blocks they can replace.
Block State Filter can be defined as json array, it will match if any of contained state filers will match.
Block State Filter can be defined as string, then following values are valid:
- block:block_name - filters any block states which block is "block_name" (example:
minecraft:glass
). - ore_dict:ore_dictionary_tag - filters any block state registered in ore dictionary as "ore_dictionary_tag"
Block State Filter can be defined as object, then it is interpreted as advanced block state filer. It should specify block it matches and all properties which values it wants to check and allows. Layout of object as follows:
- block - defines block that this block state filter will match.
- unlimited number of block state properties this blocks contains with values allowed as string, or as json array (all values specified in array will match then). If string starts with !, it is interpreted as properties values blacklist instead. Properties unlisted here are not checked. Examples:
{
"block": "minecraft:stone",
//this will match stone block with variant granite or andesite
"variant": ["granite", "andesite"]
}
{
"block": "minecraft:stone",
//this will match stone block with any variant except andesite
"variant": "!andesite"
}