Rule-based block state provider
Minecraft Wiki article. Categories: Pending_merge, Missing_discussion_link_for_merge, Data_packs
📌 Mirrored from Minecraft Wiki
This article is reproduced from Rule-based block state provider on the Minecraft Wiki. Mirrored from revision 3652219. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
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
Sources
- Rule-based block state provider — Minecraft Wiki, CC BY-NC-SA 3.0, revision 3652219.