API reference Obsidian.API.Client
EntityRenderContext record struct
A mod entity as a frame shows it, for an IEntityRenderer: interpolated between its last two ticks.
public readonly record struct EntityRenderContext : IEquatable<EntityRenderContext>
In Obsidian.API.Client.
Properties
Age
public float Age { get; init; }The ticks since the client started tracking the entity, counting EntityRenderContext.PartialTick.
BodyYaw
public float BodyYaw { get; init; }The yaw its body faces, in degrees, which its model is turned to.
HeadYaw
public float HeadYaw { get; init; }The yaw its head faces, in degrees.
Id
public int Id { get; init; }The entity's id, as IClientWorld.GetEntity takes it.
Metadata
public IReadOnlyDictionary<byte, object> Metadata { get; init; }The entity's synced metadata, like IClientEntity.Metadata. It's the entity's own table, read-only: don't change values in it.
ModelTransform
public Matrix4x4 ModelTransform { get; init; }What the entity's model is drawn with: from model space (16 pixels to a block, Y down, feet at Y 24) to blocks from EntityRenderContext.Position, turned to EntityRenderContext.BodyYaw, scaled and tilted as it dies or sleeps. Draw with it to place parts like the model's, or build a transform of your own.
PartialTick
public float PartialTick { get; init; }How far the frame is between the last client tick and the next, from 0 to 1.
Pitch
public float Pitch { get; init; }Its pitch, in degrees: positive looking down.
Position
public VectorD Position { get; init; }Where the entity is, at its feet.
Type
public EntityType Type { get; init; }The client's entity type id.