Interface IItem
Represents an item.
Namespace: OpenMod.Extensions.Games.Abstractions.Items
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public interface IItem
Properties
| Improve this Doc View SourceAsset
Gets the asset of the item.
Declaration
IItemAsset Asset { get; }
Property Value
| Type | Description |
|---|---|
| IItemAsset |
ItemInstanceId
Gets the unique instance ID of the item.
Declaration
string ItemInstanceId { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
State
Gets the state of the item.
Declaration
IItemState State { get; }
Property Value
| Type | Description |
|---|---|
| IItemState |
Methods
| Improve this Doc View SourceSetItemAmountAsync(Double)
Sets the amount of the item.
Declaration
Task SetItemAmountAsync(double amount)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | amount | The amount to set to. |
Returns
| Type | Description |
|---|---|
| Task |
SetItemDurabilityAsync(Double)
Sets the durability of the item.
Declaration
Task SetItemDurabilityAsync(double durability)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | durability | The amount to set to. |
Returns
| Type | Description |
|---|---|
| Task |
SetItemQualityAsync(Double)
Sets the quality of the item.
Declaration
Task SetItemQualityAsync(double quality)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | quality | The quality to set to. |
Returns
| Type | Description |
|---|---|
| Task |