tutorial:blocks
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:blocks [2021/02/27 07:51] – Fix misleading highlight siglong | tutorial:blocks [2021/09/01 19:55] – Changed to 1.17 tool system. legiblesleet827 | ||
---|---|---|---|
Line 131: | Line 131: | ||
] | ] | ||
} | } | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | In minecraft 1.17, there has been a change for breaking blocks. Now, to define harvest tools and harvest levels, we need to use tags. Read about tags at: [[tutorial: | ||
+ | |||
+ | Harvest tool: src/ | ||
+ | Harvest level: src/ | ||
+ | |||
+ | <code JavaScript src/ | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <code JavaScript src/ | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
] | ] | ||
} | } | ||
Line 137: | Line 160: | ||
===== Creating a Custom Block Class ===== | ===== Creating a Custom Block Class ===== | ||
- | The above approach works well for simple | + | The above approach works well for simple |
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
Line 173: | Line 196: | ||
public class ExampleMod implements ModInitializer { | public class ExampleMod implements ModInitializer { | ||
- | public static final ExampleBlock EXAMPLE_BLOCK = new ExampleBlock(Block.Settings.of(Material.STONE).hardness(4.0f)); | + | public static final ExampleBlock EXAMPLE_BLOCK = new ExampleBlock(FabricBlockSettings.of(Material.STONE).hardness(4.0f)); |
| | ||
@Override | @Override |
tutorial/blocks.txt · Last modified: 2024/06/21 21:37 by ryhon