Json block behaviors ExchangeOnInteract

From Vintage Story Wiki
Jump to navigation Jump to search


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


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.

Main Page: Modding
Basics Mod Types | Asset System | Textures | Items | Recipes | Blocks | Model Creator | Release
Advanced Setup(Windows,Linux) | Items (Code, JSON) | Blocks | Item-Block interactions | Block Behaviors | Block Entities | Particles | World Access
Worldgen Terrain | Ores | Trees | WorldGen API
Rendering Shaders and Renderers
Property Overview Item | Block | Block Behaviors | Block Classes | Block Entities | Block Entity Behaviors