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 revision Previous revision
tutorial:tools [2020/06/09 03:36]
boogiemonster1o1 Add line numbers
tutorial:tools [2020/06/09 06:13] (current)
boogiemonster1o1 Interface fix
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: 2020/06/09 06:13 by boogiemonster1o1