Modding:Block Json Properties: Difference between revisions
From Vintage Story Wiki
Lazy Warlock (talk | contribs) |
Lazy Warlock (talk | contribs) |
||
Line 920: | Line 920: | ||
<td scope="row"><div class="tt" data-tt-id="p_sounds_hit" data-tt-parent="p_sounds">hit</div></td> | <td scope="row"><div class="tt" data-tt-id="p_sounds_hit" data-tt-parent="p_sounds">hit</div></td> | ||
<td colspan="4">While mining the block.</td> | <td colspan="4">While mining the block.</td> | ||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_sounds_bytool" data-tt-parent="p_sounds">byTool</div></td> | |||
<td colspan="4">Allows different sounds to be made based off the tool that's being used.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_bytool_info" data-tt-parent="p_sounds_bytool" data-invisible="true"></div></td> | |||
<td colspan="4"> | |||
We'll use the "rock" block as an example: | |||
<syntaxhighlight lang="json"> | |||
sounds: { | |||
walk: "walk/stone", | |||
byTool: { | |||
"Pickaxe": { hit: "block/rock-hit-pickaxe", break: "block/rock-break-pickaxe" } | |||
} | |||
}, | |||
</syntaxhighlight> | |||
</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 928: | Line 950: | ||
<td scope="row"><div class="tt" data-tt-id="p_sounds_info" data-tt-parent="p_sounds" data-invisible="true"></div></td> | <td scope="row"><div class="tt" data-tt-id="p_sounds_info" data-tt-parent="p_sounds" data-invisible="true"></div></td> | ||
<td colspan="4"> | <td colspan="4"> | ||
Here's a few examples of how different blocks have their own sound properties: | |||
'''Anvil''': | '''Anvil''': | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> |