tutorial:tools
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:tools [2020/07/20 08:54] – shedaniel | tutorial:tools [2020/07/24 07:58] – [Creating the tool objects] minor change to constructor warning boogiemonster1o1 | ||
---|---|---|---|
Line 119: | Line 119: | ||
public static ToolItem POTATO_SHOVEL = new ShovelItem(CustomToolMaterial.POTATO, | public static ToolItem POTATO_SHOVEL = new ShovelItem(CustomToolMaterial.POTATO, | ||
public static ToolItem POTATO_SWORD = new SwordItem(CustomToolMaterial.POTATO, | public static ToolItem POTATO_SWORD = new SwordItem(CustomToolMaterial.POTATO, | ||
- | public static ToolItem POTATO_HOE = new HoeItem(CustomToolMaterial.POTATO, | ||
</ | </ | ||
- | Unfortunately, | + | Unfortunately, |
<code java [enable_line_numbers=true]> | <code java [enable_line_numbers=true]> | ||
public class PickaxeSubclass extends PickaxeItem { | public class PickaxeSubclass extends PickaxeItem { | ||
Line 129: | Line 128: | ||
} | } | ||
</ | </ | ||
- | To make a pickaxe and axe, create objects of the subclasses. | + | To make a pickaxe, hoe and axe, create objects of the subclasses. |
<code java> | <code java> | ||
public static ToolItem POTATO_PICKAXE = new PickaxeSubclass(CustomToolMaterial.POTATO, | public static ToolItem POTATO_PICKAXE = new PickaxeSubclass(CustomToolMaterial.POTATO, | ||
public static ToolItem POTATO_AXE = new AxeSubclass(CustomToolMaterial.POTATO, | public static ToolItem POTATO_AXE = new AxeSubclass(CustomToolMaterial.POTATO, | ||
+ | public static ToolItem POTATO_HOE = new HoeSubclass(CustomToolMaterial.POTATO, | ||
</ | </ | ||
tutorial/tools.txt · Last modified: 2023/09/07 05:32 by drakonkinst