Minecraft:Blockstates definition
From SAS Gaming Wiki
More actions
Template:See also Template:Exclusive
Blockstates definition (also known as block state model dispatch<ref>Name used by Mojang Template:Snap</ref>) are used to render blocks when there are several different variants of them (like Minecraft:doors, which can be open or closed). Each block has its own blockstates definition file, which lists all the existing variants and links them to their corresponding Minecraft:model. Blocks can also be composed of several different models at the same time, called "multipart". The models are then used depending on the Minecraft:block state of the block.
The blockstates definitions are stored as Minecraft:JSON files in a Minecraft:resource pack in the assets/<namespace>/blockstates folder.
JSON format
- Template:Nbt Root object
- Template:Nbt: Holds the names of all the variants of the block.Template:Info needed
- Template:NbtTemplate:Nbt: Name of a variant, which consists of the relevant block states separated by commas. A block with just one variant uses
""as a name for its variant. Each variant can have one model or an array of models and contains their properties. If set to an array, the model is chosen randomly from the options given, with each option being specified in separate subsidiary Template:Nbt-tags. Item frames are treated as blocks and use"map=false"for a map-less item frame, and"map=true"for item frames with maps.
- Template:NbtTemplate:Nbt: Name of a variant, which consists of the relevant block states separated by commas. A block with just one variant uses
- Template:Nbt: Used instead of variants to combine models based on Minecraft:block state attributes.
- Template:Nbt: Determines a case and the model that should apply in that case.
- Template:Nbt: A list of cases that have to be met for the model to be applied. If unset, the model always applies.
- Template:Nbt: Matches if any of the contained cases return true. Cannot be set alongside other cases.
- Template:Nbt: A list of cases that all have to match the block to return true.
- Template:Nbt: Matches if all of the contained cases return true. Cannot be set alongside other cases.
- Template:Nbt: A list of cases that all have to match the block to return true.
- Minecraft:Blockstates definition/state Cannot be set alongside the OR or AND tag.
- Template:Nbt: Matches if any of the contained cases return true. Cannot be set alongside other cases.
- Template:NbtTemplate:Nbt: Determines the model(s) to apply and its properties. There can be one model or an array of models. If set to an array, the model is chosen randomly from the options given, with each option being specified in separate subsidiary Template:Nbt-tags.
- Template:Nbt: A list of cases that have to be met for the model to be applied. If unset, the model always applies.
- Template:Nbt: Determines a case and the model that should apply in that case.
- Template:Nbt: Holds the names of all the variants of the block.Template:Info needed
"uvlock": true
|
"uvlock": false
|
| File:Uvlock true.png | File:Uvlock false.png |