Class Item
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Represents an in game Item of Vintage Story
public class Item : CollectibleObject
- Inheritance
-
Item
- Inherited Members
- Extension Methods
Constructors
Item()
Instantiate a new item with default model transforms
public Item()
Item(int)
Instantiates a new item with given item id and stacksize = 1
public Item(int itemId)
Parameters
itemId
int
Fields
ItemId
The unique number of the item, dynamically assigned by the game
public int ItemId
Field Value
Shape
The items shape. Null for automatic shape based on the texture.
public CompositeShape Shape
Field Value
Textures
Default textures to be used for this block
public Dictionary<string, CompositeTexture> Textures
Field Value
Properties
FirstTexture
Returns the first texture in Textures
public CompositeTexture FirstTexture { get; }
Property Value
Id
The unique number of the item, dynamically assigned by the game
public override int Id { get; }
Property Value
ItemClass
The type of the collectible object
public override EnumItemClass ItemClass { get; }
Property Value
Methods
Clone()
Creates a deep copy of the item
public Item Clone()
Returns
GetRandomColor(ICoreClientAPI, ItemStack)
Should return a random pixel within the items/blocks texture
public override int GetRandomColor(ICoreClientAPI capi, ItemStack stack)
Parameters
capi
ICoreClientAPIstack
ItemStack