add Behavior
Adds a behavior to the item with a specific identifier and functionality block.
This method registers a new behavior to the item, allowing custom functionality when specific actions or events are triggered on the item. The added behavior persists through the item's lifecycle and is identified using the provided identifier.
Return
the created KItemBehavior instance associated with the registered behavior
Parameters
the unique identifier for the behavior
the functionality block defining the behavior, receiving an ItemStack and a context of type KItemBehaviorContext
See also
Adds a behavior to the item.
This method registers the provided behavior to the item, allowing it to respond to certain actions or events. The added behavior is tied to the item's functionality and may persist through the item's lifecycle.
Return
the added behavior instance
Parameters
the behavior to add