Table of Contents

Class BlockBehaviorOmniAttachable

Namespace
Vintagestory.GameContent
Assembly
VSSurvivalMod.dll

Allows a block to be attached to any face, including vertical faces. Requires states from "abstract/horizontalorientation", as well as additional "up" and "down" states. Uses the code "OmniAttachable".

[DocumentAsJson]
public class BlockBehaviorOmniAttachable : BlockBehavior
Inheritance
BlockBehaviorOmniAttachable

Examples

"behaviors": [
	{
		"name": "OmniAttachable",
		"properties": {
			"facingCode": "position",
			"attachmentAreas": {
				"down": {
					"x1": 7,
					"y1": 15,
					"z1": 7,
					"x2": 8,
					"y2": 15,
					"z2": 8
				},
				"up": {
					...
				},
				"north": {
					...
				},
				"east": {
					...
				},
				"south": {
					...
				},
				"west": {
					...
				}
			}
		}
	}
],
"variantgroups": [
	{
		"code": "position",
		"states": [ "up", "down" ],
		"loadFromProperties": "abstract/horizontalorientation"
	}
]

Fields

attachmentAreas (Optional) (Default: None)

A set of attachment cuboids for each attached face.

[DocumentAsJson("Optional", "None", false)]
private Dictionary<string, Cuboidi> attachmentAreas

Field Value

Dictionary<string, Cuboidi>

facingCode (Optional) (Default: orientation)

The variant code that defines the required states.

[DocumentAsJson("Optional", "orientation", false)]
public string facingCode

Field Value

string