Json block behaviors ExchangeOnInteract

From Vintage Story Wiki

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.

Icon Sign.png

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 ItemEntityBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository