This is a basic beginner's guide on how to modify block state changes/cycling.
1. Select Block
First, select your block in Packs/YourPackName/Server/Item/Items/your_block.json, an example file is shown at the end of the article.
2. Create an Interaction
Now, you need to create an interaction that will list the change, as well as the new block state you wish to set this to when in this mode.
3. Define States
You can now define your states mentioned above, and the texture/animations used. As shown in this example, the base model is “CustomModel” with a texture named “CustomModelTexture”.
Additionally, you can add other details to the states, such as sounds, animations, and particles.
Example Block
"BlockType": {
"DrawType": "Model",
"CustomModel": "Blocks/model_one.blockymodel",
"CustomModelTexture": [
{
"Texture": "Blocks/your_texture.png"
}
],
"Interactions": {
"Use": {
"Interactions": [
{
"Type": "ChangeState",
"Changes": {
"default": "Off",
"On": "Off",
"Off": "On"
}
}
]
}
},
"State": {
"Definitions": {
"On": {
"InteractionHint": "interactionHints.turnoff",
"CustomModel": "Blocks/model_one.blockymodel",
"CustomModelTexture": [
{
"Texture": "Blocks/Texture/textureone.png"
}
]
},
"Off": {
"InteractionHint": "interactionHints.turnon",
"CustomModel": "Blocks/model_two.blockymodel",
"CustomModelTexture": [
{
"Texture": "Blocks/Texture/textureone.png"
}
]
}
}
}
},Thank you to Sketch Macaw for helping to write this article!