Table of Contents

Class RegistryObjectVariantGroup

Namespace
Vintagestory.ServerMods
Assembly
VSEssentials.dll

This is used to define a set of variant groups for specific registry objects.

public class RegistryObjectVariantGroup
Inheritance
RegistryObjectVariantGroup

Examples

"variantgroups": [
	{
		"code": "type",
		"states": [ "spelt", "rye", "flax", "rice", "cassava", "amaranth", "sunflower" ]
	},
	{
		"code": "state",
		"states": [ "partbaked", "perfect", "charred" ]
	}
],
"variantgroups": [
	{
		"code": "rock",
		"loadFromProperties": "block/rockwithdeposit"
	}
],

Fields

Code (Required)

A unique code for this variant. Essentially an ID for each variant type.

public string Code

Field Value

string

States (Required) (Default: None)

A list of all the valid states for this variant. Only required if LoadFromProperties or LoadFromPropertiesCombine are not set.

public string[] States

Field Value

string[]

Combine (Optional) (Default: Multiply)

How this variant combines with other variant types to create individual objects.

public EnumCombination Combine

Field Value

EnumCombination

LoadFromProperties (Optional) (Default: None)

If set, copies a WorldProperties asset to create variants from.

public AssetLocation LoadFromProperties

Field Value

AssetLocation

LoadFromPropertiesCombine (Optional) (Default: None)

A set of world properties to combine to create variants from.

public AssetLocation[] LoadFromPropertiesCombine

Field Value

AssetLocation[]

OnVariant (Optional) (Default: None)

Required if using the SelectiveMultiply in Combine.

public string OnVariant

Field Value

string