Data component format/can place on
Minecraft Wiki article. Categories: Top-level_data_pages
📌 Mirrored from Minecraft Wiki
This article is reproduced from Data component format/can place on on the Minecraft Wiki. Mirrored from revision 3684926. 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.
- [NBT Compound / JSON Object][NBT List / JSON Array] minecraft:can_place_on: Determines which blocks that blocks with this component can be placed against in Adventure mode. If defined as a compound, corresponds to [NBT Compound / JSON Object] A single block predicate. Items are listed in the tooltip in the order specified.
- [NBT Compound / JSON Object]: A single block predicate. If no fields are specified, any block will match.
- [NBT List / JSON Array][String] blocks: (Optional) Any number of block type(s) (an [String] ID, or a [String] tag with
#, or an [NBT List / JSON Array] array containing [String] IDs). Test fails if the block is not a matching block type. - [NBT Compound / JSON Object] state: (Optional) Tests the block state. Test fails if the block doesn't have matching block state properties.
- [String] <key>: Property key and value.
- [NBT Compound / JSON Object] <key>: Property key and value range. If neither [String] min nor [String] max is specified, any value will match.
- [String] min: (Optional) Minimum value. Despite being represented as a string, comparison is done using the property's actual type. Integers use numeric order, and booleans order
falsebeforetrue. - [String] max: (Optional) Maximum value.
- [String] min: (Optional) Minimum value. Despite being represented as a string, comparison is done using the property's actual type. Integers use numeric order, and booleans order
- [NBT Compound / JSON Object][String] nbt: (Optional) An NBT compound, represented either as an object or a string containing SNBT. In JSON files, SNBT form is the only way to test for some NBT types. Test fails if the block doesn't have matching NBT data.
- [NBT Compound / JSON Object] components: (Optional) Data components to match exactly. Each key in this object is a component ID, and its value is a full component of that type. Test fails if the block doesn't have exactly the same value for every provided component.
- [NBT Compound / JSON Object] predicates: (Optional) Data component predicates to match components loosely. Each key in this object is a component predicate ID, and its value is a component predicate of that type. Test fails if the block's components do not match all predicates.
- [NBT List / JSON Array][String] blocks: (Optional) Any number of block type(s) (an [String] ID, or a [String] tag with
- [NBT Compound / JSON Object]: A single block predicate. If no fields are specified, any block will match.
- [NBT Compound / JSON Object][NBT List / JSON Array] minecraft:can_place_on: Determines which blocks that blocks with this component can be placed against in Adventure mode. If defined as a compound, corresponds to [NBT Compound / JSON Object] A single block predicate. Items are listed in the tooltip in the order specified.
Sources
- Data component format/can place on — Minecraft Wiki, CC BY-NC-SA 3.0, revision 3684926.