Json block behaviors ExchangeOnInteract: Difference between revisions

From Vintage Story Wiki
(Information on the "ExchangeOnInteract" block behavior.)
 
 
(One intermediate revision by the same user not shown)
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
{{Navbox/modding|Vintage Story}}


== Properties ==
== Properties ==
<code>exchangeStates: ["*-variant1-*", "*-variant2-*"]</code> The variant names that block will cycle through when it is right clicked. <br>
<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.
<code>sound: "path to sound"</code> The path to a sound that plays when the block is right clicked.
{{Navbox/modding|Vintage Story}}
219

edits