update doc/*/block-properties.md
This commit is contained in:
parent
7573c6c7d1
commit
cadd08b132
@ -34,6 +34,7 @@ Block model type from list:
|
||||
- "none" - invisible block (air)
|
||||
- "X" - grass model (two crossed sprites)
|
||||
- "aabb" - model based of block hitbox (complex hitbox will be combined into one). Examples: pipes, bulbs, panels.
|
||||
- "custom" - used when specifying custom models via *model-name*
|
||||
|
||||
### *model-name*
|
||||
|
||||
@ -64,6 +65,39 @@ Rotation profile (set of available block rotations and behaviour of placing bloc
|
||||
- "pane" - panels, doors, signs
|
||||
- "stairs" - "pane" + flipped variants
|
||||
|
||||
## Variants
|
||||
|
||||
Some properties can vary dynamically, depending on the variant number stored in the user bits of the block.
|
||||
|
||||
Variability parameters are specified in the `state-based` block:
|
||||
|
||||
```json
|
||||
{
|
||||
...
|
||||
"state-based": {
|
||||
"offset": 0,
|
||||
"bits": 4,
|
||||
"variants": [
|
||||
{...},
|
||||
...
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `offset` specifies the bit offset from which the variant index starts. (Default is 0)
|
||||
- `bits` specifies the number of bits encoding the variant index. (Default is 4).
|
||||
Currently, the maximum number of variants is 16, so specifying more than 4 bits does not make practical sense.
|
||||
|
||||
Properties available for variance:
|
||||
- model
|
||||
- model-name
|
||||
- texture
|
||||
- texture-faces
|
||||
- model-primitives (deprecated)
|
||||
|
||||
Variants are managed via `block.set_variant(x, y, z, index)`.
|
||||
|
||||
## Lighting
|
||||
|
||||
### *emission*
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
- "none" - невидимый блок (пример: воздух)
|
||||
- "X" - модель травы (крест из двух спрайтов)
|
||||
- "aabb" - модель, соответствующая хитбоксу блока (составной хитбокс будет объединен в один). Примеры: трубы, лампочки, панели.
|
||||
- "custom" - используется при указании собственной модели через *model-name*
|
||||
|
||||
### Имя модели - *model-name*
|
||||
|
||||
@ -72,6 +73,39 @@
|
||||
При приближении к блоку движок создаст эмиттер, который будет работать
|
||||
до разрушения блока или отдаления камеры на некоторое расстояние.
|
||||
|
||||
## Варианты
|
||||
|
||||
Некоторые свойства могут варьироваться динамически, в зависимости от номера варианта, хранимого в пользовательских битах блока.
|
||||
|
||||
Параметры вариативности указываются в блоке `state-based`:
|
||||
|
||||
```json
|
||||
{
|
||||
...
|
||||
"state-based": {
|
||||
"offset": 0,
|
||||
"bits": 4,
|
||||
"variants": [
|
||||
{...},
|
||||
...
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `offset` определяет битового смещения, с которого начинается индекс варианта. (По-умолчанию - 0)
|
||||
- `bits` определяет число бит, кодирующих индекс варианта. (По-умолчанию - 4).
|
||||
На данный момент максимальное число вариантов - 16, поэтому указание более 4 бит не имеет практического смысла.
|
||||
|
||||
Доступные для вариативности свойства:
|
||||
- model
|
||||
- model-name
|
||||
- texture
|
||||
- texture-faces
|
||||
- model-primitives (устарело)
|
||||
|
||||
Управление состоянием производится через `block.set_variant(x, y, z, index)`.
|
||||
|
||||
## Освещение
|
||||
|
||||
### Излучение - *emission*:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user