Item Components
Inspired by vanilla’s Data Components, Kanoho’s item components provide a powerful way to add custom functionality to items.
Kanoho’s components are stored as NBT tags, and always reside within a kanoho compound tag.
For example, to give yourself an everlasting apple, you would use the following command:
give @p minecraft:apple[minecraft:custom_data={kanoho:{consumed: false}}] 1Component Reference
Section titled “Component Reference”| Location | Type | Description |
|---|---|---|
consumed | boolean | If false, the item will not be removed after being used. |
on_used | string | A resource location of a function to call after the item has been used. |