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 [2020/05/07 18:53] – typo yanis48 | tutorial:blockentity [2020/11/29 12:11] – [Serializing Data] Add BlockState arg boogiemonster1o1 | ||
---|---|---|---|
Line 21: | Line 21: | ||
You can simply add variables to this barebone class or implement interfaces such as '' | You can simply add variables to this barebone class or implement interfaces such as '' | ||
- | ===== Registring | + | ===== Registering |
Once you have created the '' | Once you have created the '' | ||
Line 69: | Line 69: | ||
// Serialize the BlockEntity | // Serialize the BlockEntity | ||
+ | | ||
| | ||
super.toTag(tag); | super.toTag(tag); | ||
Line 84: | Line 85: | ||
<code java> | <code java> | ||
// Deserialize the BlockEntity | // Deserialize the BlockEntity | ||
- | public void fromTag(CompoundTag tag) { | + | @Override |
+ | public void fromTag(BlockState state, | ||
| | ||
| |
tutorial/blockentity.txt · Last modified: 2023/09/20 19:18 by haykam