Table of Contents

Class BlockBehaviorDecor

Namespace
Vintagestory.GameContent
Assembly
VSEssentials.dll

Allows this block to be placed on the side of another block, as a decorational shape/texture. Uses the code "decor".

[AddDocumentationProperty("Sides", "A list of sides that this decor block can be placed on.", "System.String[]", "Required", "", false)]
[AddDocumentationProperty("DrawIfCulled", "If true, do not cull even if parent face was culled (used e.g. for medium carpet, which stick out beyond the parent face)", "System.Boolean", "Optional", "False", false)]
[AddDocumentationProperty("AlternateZOffset", "If true, alternates z-offset vertexflag by 1 in odd/even XZ positions to reduce z-fighting (used e.g. for medium carpets overlaying neighbours)", "System.Boolean", "Optional", "False", false)]
[AddDocumentationProperty("NotFullFace", "If true, this decor is NOT (at least) a full opaque face so that the parent block face still needs to be drawn", "System.Boolean", "Optional", "False", false)]
[AddDocumentationProperty("Removable", "If true, this decor is removable using the players hands, without breaking the parent block", "System.Boolean", "Optional", "False", false)]
[AddDocumentationProperty("Thickness", "The thickness of this decor block. Used to adjust selection box of the parent block.", "System.Single", "Optional", "0.03125", false)]
[DocumentAsJson]
public class BlockBehaviorDecor : BlockBehavior
Inheritance
BlockBehaviorDecor

Examples

"behaviors": [
	{
		"name": "Decor",
		"properties": {
			"sides": [ "north", "east", "south", "west", "up", "down" ],
			"notFullFace": true,
			"thickness": 0.0
		}
	}
],

Fields

Sides (Required)

A list of sides that this decor block can be placed on.

Field Value

String[]

AlternateZOffset (Optional) (Default: False)

If true, alternates z-offset vertexflag by 1 in odd/even XZ positions to reduce z-fighting (used e.g. for medium carpets overlaying neighbours)

Field Value

bool

DrawIfCulled (Optional) (Default: False)

If true, do not cull even if parent face was culled (used e.g. for medium carpet, which stick out beyond the parent face)

Field Value

bool

NotFullFace (Optional) (Default: False)

If true, this decor is NOT (at least) a full opaque face so that the parent block face still needs to be drawn

Field Value

bool

nwOrientable (Optional) (Default: False)

If true, this decor will automatically pick a variant based on rotation.

[DocumentAsJson("Optional", "False", false)]
private bool nwOrientable

Field Value

bool

Removable (Optional) (Default: False)

If true, this decor is removable using the players hands, without breaking the parent block

Field Value

bool

sidedVariants (Optional) (Default: False)

If true, this decor supplies its own different models for NSEWUD placement, if false the code will auto-rotate the model.

[DocumentAsJson("Optional", "False", false)]
private bool sidedVariants

Field Value

bool

Thickness (Optional) (Default: 0.03125)

The thickness of this decor block. Used to adjust selection box of the parent block.

Field Value

Single