Wiki ArticlePending mergeMissing discussion link for mergeData packs
Rule-based block state provider
A Rule-based block state provider provides a block and block state depending on the block that currently exists in the world using a series of rules (i.e. block predicates) to be placed by configured features.
Rule-based block state providers are defines using the following format:
It has been suggested that this page be merged with block state provider.
[discuss]
If this merge affects many pages or may potentially be controversial, do not merge the page until a consensus is reached.
Reason: since 26.1-snapshot-11, it has been changed to block state provider type, not a separate data type.
Reason: since 26.1-snapshot-11, it has been changed to block state provider type, not a separate data type.
A Rule-based block state provider provides a block and block state depending on the block that currently exists in the world using a series of rules (i.e. block predicates) to be placed by configured features.
JSON format
Rule-based block state providers are defines using the following format:
- [NBT Compound / JSON Object] A rule-based block state provider
- [NBT Compound / JSON Object] fallback The block to use when no rules' predicates match. This field is optional. If unspecified and no rules' predicates match, then no block is placed.
- Block state provider see Template:Nbt inherit/block state provider/template
- [NBT List / JSON Array] rules (Required, but can be empty) Rules of the block to use.
- [NBT Compound / JSON Object] One rule.
- [NBT Compound / JSON Object] if_true The block predicate of this rule.
- [String] type: The type of the block predicate. See Block predicate § Types for options.
- additional fields depending on [String] type. See Block predicate § Types.
- [NBT Compound / JSON Object] then The block to use when the predicate is passed.
- Block state provider see Template:Nbt inherit/block state provider/template
- [NBT Compound / JSON Object] if_true The block predicate of this rule.
- [NBT Compound / JSON Object] One rule.
- [NBT Compound / JSON Object] fallback The block to use when no rules' predicates match. This field is optional. If unspecified and no rules' predicates match, then no block is placed.
Navigation
| |||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||