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/07/20 08:54] shedanieltutorial:tools [2020/07/24 07:57] – [Creating the tool objects] Updated constructor warning boogiemonster1o1
Line 119: Line 119:
 public static ToolItem POTATO_SHOVEL = new ShovelItem(CustomToolMaterial.POTATO, 1.5F, -3.0F, new Item.Settings().group(ItemGroup.TOOLS)); public static ToolItem POTATO_SHOVEL = new ShovelItem(CustomToolMaterial.POTATO, 1.5F, -3.0F, new Item.Settings().group(ItemGroup.TOOLS));
 public static ToolItem POTATO_SWORD = new SwordItem(CustomToolMaterial.POTATO, 3, -2.4F, new Item.Settings().group(ItemGroup.COMBAT)); public static ToolItem POTATO_SWORD = new SwordItem(CustomToolMaterial.POTATO, 3, -2.4F, new Item.Settings().group(ItemGroup.COMBAT));
-public static ToolItem POTATO_HOE = new HoeItem(CustomToolMaterial.POTATO, -2.0F, new Item.Settings().group(ItemGroup.TOOLS)); 
 </code> </code>
-Unfortunately, `PickaxeItem` and `AxeItem` only have protected constructor, so you'll have to make classes that extends each of them. Creating a subclass makes making multiple pickaxes or axes easier.+Unfortunately, `PickaxeItem` , `HoeItem` and `AxeItem` only have protected constructors, so you'll have to make classes that extends each of them. Creating a subclass makes making multiple pickaxes or axes easier.
 <code java [enable_line_numbers=true]> <code java [enable_line_numbers=true]>
 public class PickaxeSubclass extends PickaxeItem { public class PickaxeSubclass extends PickaxeItem {
tutorial/tools.txt · Last modified: 2023/09/07 05:32 by drakonkinst