User Tools

Site Tools


tutorial:tools

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:tools [2020/06/09 03:36] – Add line numbers boogiemonster1o1tutorial:tools [2020/07/20 08:53] shedaniel
Line 12: Line 12:
  
 <code java [enable_line_numbers=true]> <code java [enable_line_numbers=true]>
-public enum CustomToolMaterial implements ArmorMaterial {;+public enum CustomToolMaterial implements ToolMaterial {;
     CustomToolMaterial(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient) {     CustomToolMaterial(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient) {
    
Line 29: Line 29:
 To make these values accessible from outside the constructor, create a final field for each of them and assign their values in the constructor. To make these values accessible from outside the constructor, create a final field for each of them and assign their values in the constructor.
 <code java [enable_line_numbers=true]> <code java [enable_line_numbers=true]>
-public enum CustomToolMaterial implements ArmorMaterial {;+public enum CustomToolMaterial implements ToolMaterial {;
     private final int miningLevel;     private final int miningLevel;
     private final int itemDurability;     private final int itemDurability;
Line 154: Line 154:
 </code> </code>
  
 +==== Making your tool work with non-vanilla blocks ====
 +
 +Visit the last section of https://fabricmc.net/wiki/tutorial:mining_levels
tutorial/tools.txt · Last modified: 2023/09/07 05:32 by drakonkinst