Home Getting Started With Scripts Using this wiki Commands CTGUI Global functions Bracket Handlers

IItemUseFinish

The IItemUseFinish function can be added to an item and will be triggered only when a user finishes using the item (e.g. finishes eating).

Importing the package

It might be required for you to import the package if you encounter any issues, so better be safe than sorry and add the import.
import mods.contenttweaker.IItemUseFinish;

Parameters

The IItemRightClickFunction is a function with the following parameters:

The function needs to return an IItemStack.

Example

script.zs
zsItem.onItemUseFinish = function(stack, world, player) {
stack.damage(1, player);
return stack;
};