User Tools

Site Tools


tutorial:blocks

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:blocks [2021/11/02 13:04] – add requiresTool() to FabricBlockSettings to make harvest level tags work suicuiunetutorial:blocks [2022/04/20 18:08] – fixed wrong namespaces ayutac
Line 30: Line 30:
 ==== Registering your Block ==== ==== Registering your Block ====
  
-Blocks should be registered under the ''Registry.BLOCK'' registry. Call ''Registry.//register//'' and pass in the appropriate arguments. You can register the block in ''onInitialize'' method or directly when creating the block instance in the static context.+Blocks should be registered under the ''Registry.BLOCK'' registry. Call ''Registry.//register//'' and pass in the appropriate arguments. You can either register the block in ''onInitialize'' method or directly when creating the block instance in the static context, as the ''register'' method returns the block instance as well.
  
 <code java [enable_line_numbers="true",highlight_lines_extra="11"]> <code java [enable_line_numbers="true",highlight_lines_extra="11"]>
Line 144: Line 144:
   "replace": false,   "replace": false,
   "values": [   "values": [
-    "example:example_block"+    "tutorial:example_block"
   ]   ]
 } }
Line 153: Line 153:
   "replace": false,   "replace": false,
   "values": [   "values": [
-    "example:example_block"+    "tutorial:example_block"
   ]   ]
 } }
tutorial/blocks.txt · Last modified: 2024/04/15 01:52 by solidblock