tutorial:blockentity
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
tutorial:blockentity [2022/12/16 02:14] – [Registering your BlockEntity] solidblock | tutorial:blockentity [2023/06/03 17:57] – fixed typos terra | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | A BlockEntity is primarily used to store data within blocks. Before creating one, you will need a [[tutorial: | + | A BlockEntity is primarily used to store data within blocks. Before creating one, you will need a [[tutorial: |
===== Creating a BlockEntity ===== | ===== Creating a BlockEntity ===== | ||
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 '' | ||
Line 94: | Line 94: | ||
</ | </ | ||
- | Once you have implemented the '' | + | Once you have implemented the '' |
===== Sync data from server to client ===== | ===== Sync data from server to client ===== | ||
- | The data is read in the server world usually. Most data are not needed by the client, for example, your client does not need to know what's in the chest or furnace, until you open the GUI. But for some block entities, such as signs and banners, you have to inform the client of the data of the block entity, for example, for renderering. | + | The data is read in the server world usually. Most data are not needed by the client, for example, your client does not need to know what's in the chest or furnace, until you open the GUI. But for some block entities, such as signs and banners, you have to inform the client of the data of the block entity, for example, for rendering. |
For version 1.17.1 and below, implement '' | For version 1.17.1 and below, implement '' |
tutorial/blockentity.txt · Last modified: 2023/09/20 19:18 by haykam