Json block behaviors ExchangeOnInteract: Difference between revisions

From Vintage Story Wiki
 
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}}
219

edits