Skip to content

API reference Obsidian.API.Client

ItemModelContext record struct

What an item is drawn for, besides its stack: given to a mod's item model properties (see IClientRegistry.RegisterItemCondition) and item renderers (see IItemRenderer).

public readonly record struct ItemModelContext : IEquatable<ItemModelContext>

In Obsidian.API.Client.

Properties

DayTime

public long DayTime { get; init; }

The time of day, in ticks: 0 at sunrise, 6000 at noon, counting on across days; 0 outside a world.

DisplayContext

public ItemDisplayContext DisplayContext { get; init; }

Where the item is drawn.

GameTime

public long GameTime { get; init; }

The world's game time, in ticks, as the server's level counts them (ILevel.Time), which the client follows; 0 outside a world.

HolderId

public int? HolderId { get; init; }

The entity holding or showing the stack, as IClientWorld.GetEntity takes it: the mob or player holding or wearing it, the item frame showing it, or the dropped item; the player for their inventory and hotbar. Null when there's none, like in menus outside a world.

On this page