Json block behaviors ExchangeOnInteract: Difference between revisions
From Vintage Story Wiki
Lazy Warlock (talk | contribs) |
Lazy Warlock (talk | contribs) |
||
Line 2: | Line 2: | ||
Enables a block to be switched to a different variant when it is interacted with using the right click function. Using this behavior requires that the item has two variants available that can be switched to and from (such as the trapdoor). Used by: | Enables a block to be switched to a different variant when it is interacted with using the right click function. Using this behavior requires that the item has two variants available that can be switched to and from (such as the trapdoor). Used by: | ||
* trapdoor | * trapdoor | ||
== Properties == | |||
<code>exchangeStates: ["*-variant1-*", "*-variant2-*"]</code> The variant names that block will cycle through when it is right clicked. <br> | |||
<code>sound: "path to sound"</code> The path to a sound that plays when the block is right clicked. | |||
{{Navbox/modding|Vintage Story}} | {{Navbox/modding|Vintage Story}} |
Latest revision as of 07:08, 30 April 2020
Purpose
Enables a block to be switched to a different variant when it is interacted with using the right click function. Using this behavior requires that the item has two variants available that can be switched to and from (such as the trapdoor). Used by:
- trapdoor
Properties
exchangeStates: ["*-variant1-*", "*-variant2-*"]
The variant names that block will cycle through when it is right clicked.
sound: "path to sound"
The path to a sound that plays when the block is right clicked.
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Theme Pack |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |