Class BlockBehaviorExchangeOnInteract
- Namespace
- Vintagestory.GameContent
- Assembly
- VSSurvivalMod.dll
Allows a block to swap between a set of states on activation. Note that this behavior has some small hardcoding for legacy trapdoors. This behavior is used with the code "ExchangeOnInteract".
[DocumentAsJson]
public class BlockBehaviorExchangeOnInteract : BlockBehavior
- Inheritance
-
BlockBehaviorExchangeOnInteract
Examples
"behaviors": [
{
"name": "ExchangeOnInteract",
"properties": {
"exchangeStates": [ "*-closed-*", "*-opened-*" ],
"sound": "block/door",
"actionLangCode": "blockhelp-trapdoor-openclose"
}
}
]
Fields
actionlangcode (Required)
The lang code to show text when hovering over this block.
[DocumentAsJson("Required", "", false)]
private string actionlangcode
Field Value
blockCodes (Required)
The list of block codes to iterate over upon interaction.
[DocumentAsJson("Required", "", false)]
private AssetLocation[] blockCodes
Field Value
sound (Required)
The soudn to play when this block with exchanged.
[DocumentAsJson("Required", "", false)]
private string sound