API reference Obsidian.API.Client
BlockModelPart record struct
A model drawn in a block, turned like a blockstate file's model: X then Y degrees clockwise (0, 90, 180 or 270) looking along the axis, its faces' cull faces turning with it; then moved by BlockModelPart.Offset.
public readonly record struct BlockModelPart : IEquatable<BlockModelPart>
In Obsidian.API.Client.
Constructors
BlockModelPart(string, int, int, bool)
public BlockModelPart(string Model, int X = 0, int Y = 0, bool UvLock = false);A model drawn in a block, turned like a blockstate file's model: X then Y degrees clockwise (0, 90, 180 or 270) looking along the axis, its faces' cull faces turning with it; then moved by BlockModelPart.Offset.
Parameters
Model- The model, one of
BlockEntityModelProperties.Models. X- The rotation about the X axis, in degrees.
Y- The rotation about the Y axis, in degrees.
UvLock- Whether textures keep their world orientation as the model turns.
Properties
Model
public string Model { get; init; }The model, one of BlockEntityModelProperties.Models.
Offset
public VectorF Offset { get; init; }How far the model is moved after it's turned, in sixteenths of a block on each axis, from -16 to 16: to draw one model in each of a drive's slots, say. Its textures move with it. A moved face keeps its cull face only while it still lies within that side of the block.
Remarks
Drawn by a block entity or item renderer, the model is moved before the renderer's transform.
UvLock
public bool UvLock { get; init; }Whether textures keep their world orientation as the model turns.
X
public int X { get; init; }The rotation about the X axis, in degrees.
Y
public int Y { get; init; }The rotation about the Y axis, in degrees.