Skip to content

API reference Obsidian.API.Inventory

ItemInventoryTickContext class

A stack of an item ticking in a player's inventory.

public sealed class ItemInventoryTickContext

In Obsidian.API.

Constructors

public ItemInventoryTickContext();

Properties

EquipmentSlot

public EquipmentSlot? EquipmentSlot { get; init; }

The equipment slot the stack is in: EquipmentSlot.MainHand for the selected hotbar slot, the off hand or an armour slot; null elsewhere in the inventory.

IsSelected

public bool IsSelected { get; }

Whether the stack is in the player's selected hotbar slot, their main hand.

public required IPlayer Player { get; init; }

Slot

public required int Slot { get; init; }

The stack's slot in the player's inventory: 5 to 8 for the head, chest, legs and feet, 9 to 35 for the main inventory, 36 to 44 for the hotbar and 45 for the off hand.

public required ItemStack Stack { get; init; }

On this page