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 [2019/05/28 18:23] – Trying file names on the JSON code blocks jamieswhiteshirttutorial:blocks [2019/05/30 11:47] – [Introduction] Explain the use of placeholders jamieswhiteshirt
Line 3: Line 3:
 ==== Introduction ==== ==== Introduction ====
  
-To add a block to your mod, you will need to register a new instance of the Block class. For more control over your block, you can create a custom block class. We'll also look at adding a block model. +To add a block to your mod, you will need to register a new instance of the Block class. For more control over your block, you can create a custom block class. We'll also look at adding a block model. In this tutorial the "wikitut" namespace and the "example_block" name are used as placeholders, which should be replaced by the appropriate values for your mod and block.
- +
-  +
 ==== Creating a Block ==== ==== Creating a Block ====
  
Line 94: Line 92:
 <code JavaScript src/main/resources/assets/wikitut/models/item/example_block.json> <code JavaScript src/main/resources/assets/wikitut/models/item/example_block.json>
 { {
-  "parent": "my-mod:block/example_block"+  "parent": "wikitut:block/example_block"
 } }
 </code> </code>
tutorial/blocks.txt · Last modified: 2024/04/15 01:52 by solidblock