Modding:Item Json Properties: Difference between revisions

From Vintage Story Wiki
Line 458: Line 458:
     <td>The mining speed for each material.</td>
     <td>The mining speed for each material.</td>
     <td>pickaxe</td>
     <td>pickaxe</td>
  </tr>
  <tr>
    <td scope="row"><div class="tt" data-tt-id="p_miningspeed_info" data-tt-parent="p_miningspeed" data-invisible="true"></div></td>
    <td colspan="4">
Materials types are hardcoded into blocks, and include the following types:
''soil, gravel, sand, wood, leaves, stone, liquid, snow, ice, metal, mantle, plant, glass, ceramic, cloth, lava, brick, fire, other''
An item is not limited to a single material that it can mine, so if you wanted to make a tool (such as a mattock) that could mine many materials you could do the following:
<syntaxhighlight lang="json">
miningspeed: {
          "dirt": 5,
          "gravel": 4,
          "ice": 7,
          "metal": 3,
          "sand": 4,
          "snow": 3,
          "stone": 6,
        }
</syntaxhighlight>
</td>
   </tr>
   </tr>
     <td scope="row"><div class="tt" data-tt-id="p_miningspeed" data-tt-parent="root">miningtier</div></td>
     <td scope="row"><div class="tt" data-tt-id="p_miningspeed" data-tt-parent="root">miningtier</div></td>
219

edits