Modding:Block Json Properties: Difference between revisions
From Vintage Story Wiki
CreativeMD (talk | contribs) No edit summary |
|||
Line 26: | Line 26: | ||
<td>number</td> | <td>number</td> | ||
<td>64</td> | <td>64</td> | ||
<td>Determines the maximum amount you can stack the block in one slot</td> | <td>Determines the maximum amount you can stack the block in one slot.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 32: | Line 32: | ||
<td>boolean</td> | <td>boolean</td> | ||
<td>true</td> | <td>true</td> | ||
<td>If the block will be added to game or not</td> | <td>If the block will be added to game or not.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 38: | Line 38: | ||
<td>enum</td> | <td>enum</td> | ||
<td>opaque</td> | <td>opaque</td> | ||
<td>Determines how the block will be drawn</td> | <td>Determines how the block will be drawn.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 44: | Line 44: | ||
<td></td> | <td></td> | ||
<td>0</td> | <td>0</td> | ||
<td>Used for solid blocks with no half transparency</td> | <td>Used for solid blocks with no half transparency.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 50: | Line 50: | ||
<td></td> | <td></td> | ||
<td>1</td> | <td>1</td> | ||
<td>Used for non-solid single faced blocks, such as tall grass</td> | <td>Used for non-solid single faced blocks, such as tall grass.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 62: | Line 62: | ||
<td></td> | <td></td> | ||
<td>3</td> | <td>3</td> | ||
<td>Used for liquids, produces | <td>Used for liquids, produces waves.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 68: | Line 68: | ||
<td></td> | <td></td> | ||
<td>4</td> | <td>4</td> | ||
<td>Used for grass covered blocks. Allows for a smooth transition from grass to soil, while still allowing climate tinting of grass</td> | <td>Used for grass covered blocks. Allows for a smooth transition from grass to soil, while still allowing climate tinting of grass.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 74: | Line 74: | ||
<td>arrays</td> | <td>arrays</td> | ||
<td></td> | <td></td> | ||
<td>Allows you define multiple variants of the same block</td> | <td>Allows you define multiple variants of the same block.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 80: | Line 80: | ||
<td>arrays</td> | <td>arrays</td> | ||
<td></td> | <td></td> | ||
<td>In which creative inventory tabs the block should be visible in</td> | <td>In which creative inventory tabs the block should be visible in.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 86: | Line 86: | ||
<td>object</td> | <td>object</td> | ||
<td></td> | <td></td> | ||
<td>For the json drawtype, the shape definition of the block as shown in the players inventory</td> | <td>For the json drawtype, the shape definition of the block as shown in the players inventory.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 92: | Line 92: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>The path to the shape json file, the base dir is assets/shapes/</td> | <td>The path to the shape json file, the base dir is ''assets/shapes/''.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 98: | Line 98: | ||
<td>object</td> | <td>object</td> | ||
<td></td> | <td></td> | ||
<td>For the json drawtype, the shape definition of the block as shown in the world, dropped on the ground or held in hand</td> | <td>For the json drawtype, the shape definition of the block as shown in the world, dropped on the ground or held in hand.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 104: | Line 104: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>The path to the shape json file, the base dir is assets/shapes/</td> | <td>The path to the shape json file, the base dir is ''assets/shapes/''.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 110: | Line 110: | ||
<td>object</td> | <td>object</td> | ||
<td></td> | <td></td> | ||
<td>When defining multiple block variants, use this property to selectively choose the shape of a variant</td> | <td>When defining multiple block variants, use this property to selectively choose the shape of a variant.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 116: | Line 116: | ||
<td>boolean</td> | <td>boolean</td> | ||
<td>true</td> | <td>true</td> | ||
<td>If ambient occlusion will be applied to the block</td> | <td>If ambient occlusion will be applied to the block.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 122: | Line 122: | ||
<td>string</td> | <td>string</td> | ||
<td></td> | <td></td> | ||
<td>The blocks material, check [[Block Materials]] for a full list. Amongst others, it will | <td>The blocks material, check [[Block Materials]] for a full list. Amongst others, it will determine how quickly a specific tool can mine it.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 218: | Line 218: | ||
<td>arrays</td> | <td>arrays</td> | ||
<td></td> | <td></td> | ||
<td>The texture definitions for the block as seen in the world, when dropped on the ground or held in the hand</td> | <td>The texture definitions for the block as seen in the world, when dropped on the ground or held in the hand.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 230: | Line 230: | ||
<td>arrays</td> | <td>arrays</td> | ||
<td></td> | <td></td> | ||
<td>When defining multiple block variants, use this property to selectively choose the textures of a variant</td> | <td>When defining multiple block variants, use this property to selectively choose the textures of a variant.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 236: | Line 236: | ||
<td>arrays</td> | <td>arrays</td> | ||
<td></td> | <td></td> | ||
<td>When defining multiple block variants, use this property to selectively choose the inventory textures of a variant</td> | <td>When defining multiple block variants, use this property to selectively choose the inventory textures of a variant.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 242: | Line 242: | ||
<td></td> | <td></td> | ||
<td></td> | <td></td> | ||
<td>How many seconds it takes to break the block (excluding speed mining bonus). | <td>How many seconds it takes to break the block (excluding speed mining bonus). Decimal numbers are allowed.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 248: | Line 248: | ||
<td>enum</td> | <td>enum</td> | ||
<td></td> | <td></td> | ||
<td>The sounds to be played when a player interacts with this block</td> | <td>The sounds to be played when a player interacts with this block.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 254: | Line 254: | ||
<td></td> | <td></td> | ||
<td>player/build</td> | <td>player/build</td> | ||
<td>Sound to played when placing this block</td> | <td>Sound to played when placing this block.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 260: | Line 260: | ||
<td></td> | <td></td> | ||
<td>walk/default</td> | <td>walk/default</td> | ||
<td>Sound to played when walking on this block</td> | <td>Sound to played when walking on this block.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 266: | Line 266: | ||
<td></td> | <td></td> | ||
<td>player/destruct</td> | <td>player/destruct</td> | ||
<td>Sound to played when breaking this block</td> | <td>Sound to played when breaking this block.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 272: | Line 272: | ||
<td></td> | <td></td> | ||
<td>-</td> | <td>-</td> | ||
<td>Currently | <td>Currently unused.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 278: | Line 278: | ||
<td></td> | <td></td> | ||
<td>-</td> | <td>-</td> | ||
<td>Sound to played when moving inside block (only works for blocks that have no collisionbox, naturally)</td> | <td>Sound to played when moving inside block (only works for blocks that have no collisionbox, naturally).</td> | ||
</tr> | </tr> | ||
</table> | </table> |
Revision as of 12:18, 9 January 2017
Overview
A complete list of all available properties:
Property | Type | Default | Usage |
---|---|---|---|
json |
|||
code |
string | - | A unique identifier for the block. |
maxstacksize |
number | 64 | Determines the maximum amount you can stack the block in one slot. |
enabled |
boolean | true | If the block will be added to game or not. |
renderpass |
enum | opaque | Determines how the block will be drawn. |
opaque |
0 | Used for solid blocks with no half transparency. | |
opaquenocull |
1 | Used for non-solid single faced blocks, such as tall grass. | |
transparent |
2 | Use for solid halftransparent blocks, such as glass | |
liquid |
3 | Used for liquids, produces waves. | |
topsoil |
4 | Used for grass covered blocks. Allows for a smooth transition from grass to soil, while still allowing climate tinting of grass. | |
variantgroups |
arrays | Allows you define multiple variants of the same block. | |
creativeinventory |
arrays | In which creative inventory tabs the block should be visible in. | |
shapeinventory |
object | For the json drawtype, the shape definition of the block as shown in the players inventory. | |
base |
The path to the shape json file, the base dir is assets/shapes/. | ||
shape |
object | For the json drawtype, the shape definition of the block as shown in the world, dropped on the ground or held in hand. | |
base |
The path to the shape json file, the base dir is assets/shapes/. | ||
shapebytype |
object | When defining multiple block variants, use this property to selectively choose the shape of a variant. | |
ambientocclusion |
boolean | true | If ambient occlusion will be applied to the block. |
blockmaterial |
string | The blocks material, check Block Materials for a full list. Amongst others, it will determine how quickly a specific tool can mine it. | |
drawtype |
enum | cube | Determines how the block is tesselated, select JSON for being able to use custom JSON Models. The other values are hardcoded methods of tesselating the block. Check Drawtypes for a full list. |
blockLayer_1 |
0 | ||
blockLayer_2 |
1 | ||
blockLayer_3 |
2 | ||
blockLayer_4 |
3 | ||
blockLayer_5 |
4 | ||
blockLayer_6 |
5 | ||
blockLayer_7 |
6 | ||
json |
7 | ||
empty |
8 | ||
cube |
9 | ||
cross |
10 | ||
transparent |
11 | ||
liquid |
12 | ||
crossandsnowlayer |
13 | ||
textures |
arrays | The texture definitions for the block as seen in the world, when dropped on the ground or held in the hand. | |
texturesinventory |
arrays | The texture definitions for the block as seen in the player inventory. Overrides the textures definition if set. | |
texturesbytype |
arrays | When defining multiple block variants, use this property to selectively choose the textures of a variant. | |
texturesinventorybytype |
arrays | When defining multiple block variants, use this property to selectively choose the inventory textures of a variant. | |
resistance |
How many seconds it takes to break the block (excluding speed mining bonus). Decimal numbers are allowed. | ||
sounds |
enum | The sounds to be played when a player interacts with this block. | |
place |
player/build | Sound to played when placing this block. | |
walk |
walk/default | Sound to played when walking on this block. | |
break |
player/destruct | Sound to played when breaking this block. | |
hit |
- | Currently unused. | |
inside |
- | Sound to played when moving inside block (only works for blocks that have no collisionbox, naturally). |