tutorial:blockentity
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:blockentity [2022/08/08 04:11] – [Creating a BlockEntity] solidblock | tutorial:blockentity [2022/12/16 02:14] – [Registering your BlockEntity] solidblock | ||
---|---|---|---|
Line 23: | Line 23: | ||
===== Registering your BlockEntity ===== | ===== Registering your BlockEntity ===== | ||
- | Once you have created the '' | + | Once you have created the '' |
- | The '' | + | The '' |
<code java> | <code java> | ||
public static final BlockEntityType< | public static final BlockEntityType< | ||
- | | + | |
new Identifier(" | new Identifier(" | ||
FabricBlockEntityTypeBuilder.create(DemoBlockEntity:: | FabricBlockEntityTypeBuilder.create(DemoBlockEntity:: | ||
Line 35: | Line 35: | ||
</ | </ | ||
- | The block entity | + | The block entity |
==== Connecting a Block Entity to a Block ==== | ==== Connecting a Block Entity to a Block ==== | ||
Line 57: | Line 57: | ||
If you want to store any data in your '' | If you want to store any data in your '' | ||
- | '' | + | '' |
Knowing this, the example below demonstrates saving an integer from your '' | Knowing this, the example below demonstrates saving an integer from your '' |
tutorial/blockentity.txt · Last modified: 2023/09/20 19:18 by haykam