User Tools

Site Tools


tutorial:mining_levels

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:mining_levels [2020/05/13 14:52] – change json shedanieltutorial:mining_levels [2020/05/13 14:54] – newlines shedaniel
Line 20: Line 20:
 ==== Dealing with Block Material Madness ==== ==== Dealing with Block Material Madness ====
 Vanilla pickaxes are effective for ''STONE'', ''METAL'' and ''ANVIL''. Vanilla pickaxes are effective for ''STONE'', ''METAL'' and ''ANVIL''.
 +
 Vanilla axes are effective for ''WOOD'', ''NETHER_WOOD'', ''PLANT'', ''REPLACEABLE_PLANT'', ''BAMBOO'', ''PUMPKIN''. Vanilla axes are effective for ''WOOD'', ''NETHER_WOOD'', ''PLANT'', ''REPLACEABLE_PLANT'', ''BAMBOO'', ''PUMPKIN''.
  
 If you use any of these materials, the tool will break your block even if it is under the required mining level. If you use any of these materials, the tool will break your block even if it is under the required mining level.
 +
 To avoid this, you must create your own clone of the material. Let's say you want to create a clone for ''Material.STONE'', take a look at the code for ''Material.STONE'': To avoid this, you must create your own clone of the material. Let's say you want to create a clone for ''Material.STONE'', take a look at the code for ''Material.STONE'':
 <code java> <code java>
Line 35: Line 37:
 ==== Disable drops when using the invalid tool ==== ==== Disable drops when using the invalid tool ====
 You will need to set ''requiresTool'' in the material of the block, therefore you will want to create a clone for your material. You will need to set ''requiresTool'' in the material of the block, therefore you will want to create a clone for your material.
 +
 Let's say you want to create a clone for ''Material.WOOD'' to make your wooden block drop only when using the correct tool, take a look at the code for ''Material.STONE'': Let's say you want to create a clone for ''Material.WOOD'' to make your wooden block drop only when using the correct tool, take a look at the code for ''Material.STONE'':
 <code java> <code java>
Line 49: Line 52:
  
 Example of adding a pickaxe to the ''pickaxes'' tag: Example of adding a pickaxe to the ''pickaxes'' tag:
 +
 File Location: /src/main/resources/data/fabric/tags/items/pickaxes.json File Location: /src/main/resources/data/fabric/tags/items/pickaxes.json
 <code javascript> <code javascript>
tutorial/mining_levels.txt · Last modified: 2022/09/29 05:07 by solidblock