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/09/01 19:55] – Changed to 1.17 tool system. legiblesleet827 | tutorial:blocks [2022/04/29 09:35] – [Next Steps] solidblock | ||
---|---|---|---|
Line 30: | Line 30: | ||
==== Registering your Block ==== | ==== Registering your Block ==== | ||
- | Blocks should be registered under the '' | + | Blocks should be registered under the '' |
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
Line 137: | Line 137: | ||
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: | 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/ | + | Harvest level: src/ |
- | <code JavaScript src/ | + | <code JavaScript src/ |
{ | { | ||
" | " | ||
" | " | ||
- | "example: | + | "tutorial: |
] | ] | ||
} | } | ||
</ | </ | ||
- | <code JavaScript src/ | + | <code JavaScript src/ |
{ | { | ||
" | " | ||
" | " | ||
- | "example: | + | "tutorial: |
] | ] | ||
} | } | ||
+ | </ | ||
+ | |||
+ | For the harvest level tags (needs_stone_tool, | ||
+ | |||
+ | |||
+ | <code java [enable_line_numbers=" | ||
+ | public static final Block EXAMPLE_BLOCK = new ExampleBlock(FabricBlockSettings.of(Material.METAL).strength(4.0f).requiresTool()); | ||
</ | </ | ||
Line 229: | Line 236: | ||
[[tutorial: | [[tutorial: | ||
+ | |||
+ | To make your block flammable (that is, can be burned in fire), you may use '' |
tutorial/blocks.txt · Last modified: 2023/11/18 08:34 by solidblock