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 [2022/04/20 18:08] – fixed wrong namespaces ayutac | tutorial:blocks [2022/07/18 16:25] – [Configuring Block Drops] correcting 'ore' to 'or' rodriguezrrp | ||
---|---|---|---|
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 tool: src/ |
Harvest level: src/ | Harvest level: src/ | ||
Line 190: | Line 190: | ||
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { | public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { | ||
if (!world.isClient) { | if (!world.isClient) { | ||
- | player.sendMessage(new LiteralText(" | + | player.sendMessage(Text.of(" |
} | } | ||
Line 221: | Line 221: | ||
To fix this, we have to define the '' | To fix this, we have to define the '' | ||
- | < | + | < |
- | | + | public class ExambleBlock extends Block { |
- | | + | [...] |
- | | + | |
- | } | + | public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) { |
+ | return VoxelShapes.cuboid(0f, | ||
+ | } | ||
+ | } | ||
</ | </ | ||
Line 236: | Line 239: | ||
[[tutorial: | [[tutorial: | ||
+ | |||
+ | To make your block flammable (that is, can be burned in fire), you may use '' |
tutorial/blocks.txt · Last modified: 2024/04/15 01:52 by solidblock