## Item
The Item class represents an item in an inventory in Minecraft. It is used in the [Give]() or Nbt Commands.
> This Class is incomplete, more functionality soon...
|constructor | |
|--|--|
|ItemType \| Block \| String|the type of item(required, see example)|
|count|Integer value for the amount of stacked items|
|name|a TextComponent showing a name|
|lore| a List of TextComponents giving extra information|
|slot|The current slot of the item(does not work for give)|
|damage|the used durability of the item|
|model|int describing which model varient should be used|
|nbt|addional NBT as Dart Map|
**Example:**
```dart
Give(Entity.Selected(),
item: Item(
ItemType.iron_axe, // OR Block.stone OR "whatever id"
count: 5,
name: TextComponent("My Item",color:Color.Black),
lore: [
TextComponent("My Description",color:Color.Blue),
],
damage: 40,
model: 3390001,
nbt: {
"customNBT":1
}
)
)
⇒ give @s minecraft:iron_axe{"customNBT":1,"Damage":40,"CustomModelData":3390001,"display":{"Name":"{\"text\":\"My Item\",\"color\":\"black\"}","Lore":["{\"text\":\"My Description\",\"color\":\"blue\"}"]}} 5
```
ItemType is like EntityType or Block a utility class to provide a list of all available items.
|ItemType([minecraft_item_id])| creates a ItemType from a String |
|--|--|
|ItemType.[minecraft_item_id]|there is also an value for each item in Minecraft|