Modding:Block Json Properties: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
== Overview ==
== Overview ==
A complete list of all available properties:
A complete list of all available properties:


<table id="treeviewtable" class="table table-bordered tt-table">
<table id="treeviewtable" class="table table-bordered tt-table">
Line 15: Line 14:
     <td></td>
     <td></td>
     <td></td>
     <td></td>
  </tr>
  <tr>
    <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;"><b>Common</b></td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 33: Line 35:
     <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>
    <td scope="row"><div class="tt" data-tt-id="p_class" data-tt-parent="root">class</div></td>
    <td>string</td>
    <td>block</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_behaviors" data-tt-parent="root">behaviors</div></td>
    <td>array of strings</td>
    <td>empty</td>
    <td></td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_variantgroups" data-tt-parent="root">variantgroups</div></td>
    <td>arrays</td>
    <td></td>
    <td>Allows you define multiple variants of the same block.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_blockmaterial" data-tt-parent="root">blockmaterial</div></td>
    <td>string</td>
    <td></td>
    <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>
    <td scope="row"><div class="tt" data-tt-id="p_resistance" data-tt-parent="root">resistance</div></td>
    <td></td>
    <td></td>
    <td>How many seconds it takes to break the block (excluding speed mining bonus). Decimal numbers are allowed.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_creativeinventory" data-tt-parent="root">creativeinventory</div></td>
    <td>arrays</td>
    <td></td>
    <td>In which creative inventory tabs the block should be visible in.</td>
  </tr>
  <tr>
    <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;"><b>Rendering</b></td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 71: Line 112:
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_variantgroups" data-tt-parent="root">variantgroups</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_shape" data-tt-parent="root">shape</div></td>
     <td>arrays</td>
     <td>object</td>
     <td></td>
     <td></td>
     <td>Allows you define multiple variants of the same block.</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>
     <td scope="row"><div class="tt" data-tt-id="p_creativeinventory" data-tt-parent="root">creativeinventory</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_base" data-tt-parent="p_shape">base</div></td>
     <td>arrays</td>
     <td></td>
     <td></td>
     <td></td>
     <td>In which creative inventory tabs the block should be visible in.</td>
     <td>The path to the shape json file, the base dir is ''assets/shapes/''.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 90: Line 131:
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_invbase" data-tt-parent="p_shapeinventory">base</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_invbase" data-tt-parent="p_shapeinventory">base</div></td>
    <td></td>
    <td></td>
    <td>The path to the shape json file, the base dir is ''assets/shapes/''.</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_shape" data-tt-parent="root">shape</div></td>
    <td>object</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>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_base" data-tt-parent="p_shape">base</div></td>
     <td></td>
     <td></td>
     <td></td>
     <td></td>
Line 119: Line 148:
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_blockmaterial" data-tt-parent="root">blockmaterial</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_drawtype" data-tt-parent="root" hide="children">drawtype</div></td>
    <td>string</td>
    <td></td>
    <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>
    <td scope="row"><div class="tt" data-tt-id="p_drawtype" data-tt-parent="root">drawtype</div></td>
     <td>enum</td>
     <td>enum</td>
     <td>cube</td>
     <td>cube</td>
Line 176: Line 199:
     <td></td>
     <td></td>
     <td>7</td>
     <td>7</td>
     <td></td>
     <td>Will draw a json model.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 182: Line 205:
     <td></td>
     <td></td>
     <td>8</td>
     <td>8</td>
     <td></td>
     <td>Nothing will be drawn.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 188: Line 211:
     <td></td>
     <td></td>
     <td>9</td>
     <td>9</td>
     <td></td>
     <td>Draws an ordinary cube.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 231: Line 254:
     <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>
    <td scope="row"><div class="tt" data-tt-id="p_SideOpaque" data-tt-parent="root">SideOpaque</div></td>
    <td>directional object</td>
    <td></td>
    <td></td>
   </tr>
   </tr>
   <tr>
   <tr>
Line 239: Line 268:
   </tr>
   </tr>
   <tr>
   <tr>
     <td scope="row"><div class="tt" data-tt-id="p_resistance" data-tt-parent="root">resistance</div></td>
     <td colspan="4" style='font-size: 14pt; border-bottom: 2pt solid black; padding-left: 100px;"><b>Sound</b></td>
    <td></td>
    <td></td>
    <td>How many seconds it takes to break the block (excluding speed mining bonus). Decimal numbers are allowed.</td>
   </tr>
   </tr>
   <tr>
   <tr>
Confirmedusers, editor, Administrators
886

edits