Class BlockBehaviorDoor
- Namespace
- Vintagestory.GameContent
- Assembly
- VSSurvivalMod.dll
A block behavior for a door. Also requires the "door" block entity behavior type on a block to work. Defined with the "Door" code.
[DocumentAsJson]
[AddDocumentationProperty("TriggerSound", "Sets both OpenSound & CloseSound.", "Vintagestory.API.Common.AssetLocation", "Optional", "sounds/block/door", true)]
public class BlockBehaviorDoor : StrongBlockBehavior
- Inheritance
-
StrongBlockBehaviorBlockBehaviorDoor
Examples
"behaviors": [
{ "name": "Door" }
]
"attributes": {
"widthByType": {
"*": 1
},
"heightByType": {
"*": 2
},
"openSoundByType": {
"*": "sounds/block/cokeovendoor-open"
},
"closeSoundByType": {
"*": "sounds/block/cokeovendoor-close"
}
}
Properties
airtight (Optional) (Default: True)
Is this door airtight?
[DocumentAsJson("Optional", "True", true)]
public bool airtight
Property Value
CloseSound (Optional) (Default: sounds/block/door)
The sound to play when the door is closed.
[DocumentAsJson("Optional", "sounds/block/door", true)]
public AssetLocation CloseSound
Property Value
handopenable (Optional) (Default: True)
Can this door be opened by hand?
[DocumentAsJson("Optional", "True", true)]
public bool handopenable
Property Value
height (Optional) (Default: 1)
The height of the multiblock instance for the door.
[DocumentAsJson("Optional", "1", true)]
public int height
Property Value
OpenSound (Optional) (Default: sounds/block/door)
The sound to play when the door is opened.
[DocumentAsJson("Optional", "sounds/block/door", true)]
public AssetLocation OpenSound
Property Value
TriggerSound (Optional) (Default: sounds/block/door)
Sets both OpenSound & CloseSound.
Property Value
width (Optional) (Default: 1)
The width of the multiblock instance for the door.
[DocumentAsJson("Optional", "1", true)]
public int width