MOD Lesson 7 / 10Free open classes
Build a block with four states
Right click and add one, the integer determines the model and capability
In Fabric 1.20, use IntProperty to save 0-3, right-click to cycle through plus one, and press the value to switch the model, brightness, particles or actually replace it with another block.
Lesson goals
After completing this lesson
- Use IntProperty to represent finite integer states
- Understanding the modulo loop and server status synchronization
- Distinguish between state switching, block replacement and BlockEntity data
Works of this courseFour-level growth core and attribute expansion experiment
Courseware
Read courseware online
The course is based on simon-minecraft-template-1.20 and contains an IntelliJ project screenshot, complete code, test and error.