Modding:Block Json Properties: Difference between revisions

From Vintage Story Wiki
Line 253: Line 253:
     <td scope="row"><div class="tt" data-tt-id="p_place" data-tt-parent="p_sounds">place</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_place" data-tt-parent="p_sounds">place</div></td>
     <td></td>
     <td></td>
     <td>0</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>
Line 259: Line 259:
     <td scope="row"><div class="tt" data-tt-id="p_walk" data-tt-parent="p_sounds">walk</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_walk" data-tt-parent="p_sounds">walk</div></td>
     <td></td>
     <td></td>
     <td>1</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>
Line 265: Line 265:
     <td scope="row"><div class="tt" data-tt-id="p_break" data-tt-parent="p_sounds">break</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_break" data-tt-parent="p_sounds">break</div></td>
     <td></td>
     <td></td>
     <td>2</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>
Line 271: Line 271:
     <td scope="row"><div class="tt" data-tt-id="p_hit" data-tt-parent="p_sounds">hit</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_hit" data-tt-parent="p_sounds">hit</div></td>
     <td></td>
     <td></td>
     <td>3</td>
     <td>-</td>
     <td></td>
     <td>Currently not used</td>
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_inside" data-tt-parent="p_sounds">inside</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_inside" data-tt-parent="p_sounds">inside</div></td>
     <td></td>
     <td></td>
     <td>4</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:39, 5 January 2017

Overview

A complete list of all available properties:


Property Type Default Usage
json
code
string empty 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 water 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 affect with what tool it can be mined with quickly
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 when not using tool. Can use decimal numbers.
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 not used
inside
- Sound to played when moving inside block (only works for blocks that have no collisionbox, naturally)