Table of Contents

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
StrongBlockBehavior
BlockBehaviorDoor

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

bool

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

AssetLocation

handopenable (Optional) (Default: True)

Can this door be opened by hand?

[DocumentAsJson("Optional", "True", true)]
public bool handopenable

Property Value

bool

height (Optional) (Default: 1)

The height of the multiblock instance for the door.

[DocumentAsJson("Optional", "1", true)]
public int height

Property Value

int

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

AssetLocation

TriggerSound (Optional) (Default: sounds/block/door)

Sets both OpenSound & CloseSound.

Property Value

AssetLocation

width (Optional) (Default: 1)

The width of the multiblock instance for the door.

[DocumentAsJson("Optional", "1", true)]
public int width

Property Value

int