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
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
LoadFromProperties (Optional) (Default: None)
If set, copies a WorldProperties asset to create variants from.
public AssetLocation LoadFromProperties
Field Value
LoadFromPropertiesCombine (Optional) (Default: None)
A set of world properties to combine to create variants from.
public AssetLocation[] LoadFromPropertiesCombine
Field Value
OnVariant (Optional) (Default: None)
Required if using the SelectiveMultiply in Combine.
public string OnVariant