Table of Contents

Class BlockBehaviorTrapDoor

Namespace
Vintagestory.GameContent
Assembly
VSSurvivalMod.dll

Marks a block as an animated trapdoor. Requires the use of the BEBehaviorTrapDoor block entity behavior. Uses the "TrapDoor" code.

[DocumentAsJson]
[AddDocumentationProperty("TriggerSound", "The sound to play when the trapdoor is opened or closed.", "System.String", "Optional", "sounds/block/door", true)]
public class BlockBehaviorTrapDoor : StrongBlockBehavior
Inheritance
StrongBlockBehavior
BlockBehaviorTrapDoor

Examples

"behaviors": [
	{
		"name": "TrapDoor" 
	}
],
...
"attributes": {
	"airtightByType": {
		"trapdoor-solid*": true,
		"*": false
	},
	"openSound": "sounds/block/door",
	"closeSound": "sounds/block/door"
}

Properties

airtight (Optional) (Default: True)

Is the trapdoor classed as being airtight?

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

Property Value

bool

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

The sound to play when the trapdoor is closed.

[DocumentAsJson("Optional", "sounds/block/door", true)]
public AssetLocation CloseSound

Property Value

AssetLocation

handopenable (Optional) (Default: True)

Can the trapdoor be opened by hand?

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

Property Value

bool

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

The sound to play when the trapdoor is opened.

[DocumentAsJson("Optional", "sounds/block/door", true)]
public AssetLocation OpenSound

Property Value

AssetLocation

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

The sound to play when the trapdoor is opened or closed.

Property Value

String