API reference Obsidian.API.Blocks
StateProperty class
A property a plugin's block varies by, like a lamp's lit or a crop's age: the block has one state per combination of its properties' values.
public sealed class StateProperty
In Obsidian.API.
Remarks
A client mod has to declare the same block with the same properties, and each property's values in the same order, since clients number a block's states by them: StateProperty.Bool, StateProperty.Int and StateProperty.Enum order them like NeoForge's and Fabric's boolean, integer and enum properties.
Properties
Name
public string Name { get; }The property's name, like lit.
Values
public ImmutableArray<string> Values { get; }The property's values, in the order clients number states by.
Methods
Bool(string)
public static StateProperty Bool(string name);A property that is true or false.
Enum(string, string[])
public static StateProperty Enum(string name, params string[] values);A property that is one of values, listed in the order the client mod's enum declares them.
Int(string, int, int)
public static StateProperty Int(string name, int min, int max);A property that is a number from min to max.