User Tools

Site Tools


tutorial:items

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:items [2020/06/09 23:41] – formatting changes draylartutorial:items [2020/08/30 08:45] – Fix minor error siglong
Line 23: Line 23:
              
     @Override     @Override
-    public void onInitialize() +    public void onInitialize() {
-    {+
         Registry.register(Registry.ITEM, new Identifier("tutorial", "fabric_item"), FABRIC_ITEM);         Registry.register(Registry.ITEM, new Identifier("tutorial", "fabric_item"), FABRIC_ITEM);
     }      } 
Line 74: Line 73:
 </code> </code>
  
-A practical use-case for a custom item class would be making the item play a sound when you click with it:+A practical use-case for a custom item class would be making the item play a sound when you right click with it:
 <code java [enable_line_numbers="true"]> <code java [enable_line_numbers="true"]>
 public class FabricItem extends Item { public class FabricItem extends Item {
tutorial/items.txt · Last modified: 2024/04/20 08:05 by ryhon