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 revisionBoth sides next revision
tutorial:tools [2020/06/09 03:36] – Add line numbers boogiemonster1o1tutorial:tools [2020/06/09 06:13] – Interface fix boogiemonster1o1
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;
tutorial/tools.txt · Last modified: 2023/09/07 05:32 by drakonkinst