API reference Obsidian.API.Client
EntityRenderLayer record
A layer drawn over a mod entity's model (see EntityRendererProperties.Layers), like vanilla's render layers: a model layer with a texture, posed like the entity's model.
public sealed record EntityRenderLayer : IEquatable<EntityRenderLayer>
In Obsidian.API.Client.
Remarks
Its parts are posed by name like the entity's model's (heads turn, legs swing, the renderer's animations move them), so a layer whose parts are named like the model's follows it, as vanilla's layers copy their model's pose.
Constructors
public EntityRenderLayer();Properties
Model
public string Model { get; init; }The model layer, named like EntityRendererProperties.Model; null for the entity's own model, for a texture drawn over it, like vanilla's glowing eyes.
Provider
public Func<IReadOnlyDictionary<byte, object>, EntityLayerAppearance?> Provider { get; init; }Chooses the layer's look from the entity's synced metadata, like EntityRendererProperties.TextureProvider: its texture and tint, or null to hide it. Without one, the layer always shows EntityRenderLayer.Texture with EntityRenderLayer.Tint.
Remarks
It runs at most once per metadata change, on the same terms as the renderer's texture provider. If it throws, the layer shows EntityRenderLayer.Texture with EntityRenderLayer.Tint.
RenderType
public EntityRenderType RenderType { get; init; }How the layer is drawn: EntityRenderType.Cutout by default.
Texture
public required string Texture { get; init; }The texture, named like EntityRendererProperties.Texture.
Tint
public int Tint { get; init; }The colour the texture is multiplied by, as 0xRRGGBB; white by default.