40 lines
1.2 KiB
Markdown
40 lines
1.2 KiB
Markdown
# Visual
|
|
|
|
## *icon-type* and *icon* itself
|
|
|
|
Icon type defines a source of an item image displayed in inventory.
|
|
- **none** - invisible type, used for *core:empty* only (empty item, like the air block). May be removed in future updates.
|
|
- **sprite** - default type. 2D image. Requires *icon* set to *atlas_name:texture_name*. Example: *blocks:notfound*.
|
|
There's two atlases available:
|
|
- **blocks** (generated from *png* files in *res/textures/blocks/*)
|
|
- **items** (generated from *png* files in *res/textures/items/*)
|
|
- **block** - block preview. Block ID must be specified in **icon** property. Example: *base:wood*.
|
|
|
|
# Behaviour
|
|
|
|
## *placing-block*
|
|
|
|
Specifies what block will be placed on RMB click. Automatically specified in generated items.
|
|
|
|
Example: an items that places bazalt blocks:
|
|
|
|
```json
|
|
"placing-block": "base:bazalt"
|
|
```
|
|
|
|
## *emission*
|
|
|
|
Light emitted when player holds the item in hand.
|
|
|
|
An array of 3 integers - R, G, B of light in range \[0, 15\]
|
|
|
|
Examples:
|
|
|
|
- *\[15, 15, 15\]* - white with maximal intensity
|
|
- *\[7, 0, 0\]* - dim red light
|
|
- *\[0, 0, 0\]* - no emission (default value)
|
|
|
|
## *stack-size*
|
|
|
|
Maximal number of an item units in one slot. Default - 64.
|